summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2022-03-17 09:54:21 +0100
committerSlávek Banko <[email protected]>2022-03-18 12:45:32 +0100
commiteeae53f59df4d79d0399c2217a165ff2fab754db (patch)
tree768c8b3c67ed80698dcb4e66285ad673e9d3fb0f
parenta6454b1658d325d6ff2d6ba6c349b772148798e0 (diff)
downloadkmymoney-eeae53f59df4d79d0399c2217a165ff2fab754db.tar.gz
kmymoney-eeae53f59df4d79d0399c2217a165ff2fab754db.zip
Replace the use of the old API TQString::data().
The definition of -UTQT_NO_COMPAT is no longer needed. Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r--CMakeLists.txt2
-rw-r--r--kmymoney2/converter/mymoneygncreader.cpp105
-rw-r--r--kmymoney2/converter/mymoneyqifprofile.cpp8
-rw-r--r--kmymoney2/converter/mymoneyqifreader.cpp18
-rw-r--r--kmymoney2/converter/mymoneystatementreader.cpp22
-rw-r--r--kmymoney2/dialogs/investactivities.cpp2
-rw-r--r--kmymoney2/dialogs/kendingbalancedlg.cpp16
-rw-r--r--kmymoney2/dialogs/kequitypriceupdatedlg.cpp2
-rw-r--r--kmymoney2/dialogs/transactioneditor.cpp16
-rw-r--r--kmymoney2/kmymoney2.cpp28
-rw-r--r--kmymoney2/kmymoneyutils.cpp8
-rw-r--r--kmymoney2/mymoney/mymoneyaccount.cpp6
-rw-r--r--kmymoney2/mymoney/mymoneyfile.cpp16
-rw-r--r--kmymoney2/mymoney/mymoneyobjectcontainer.cpp2
-rw-r--r--kmymoney2/mymoney/mymoneyscheduled.cpp2
-rw-r--r--kmymoney2/mymoney/mymoneytransactionfilter.cpp6
-rw-r--r--kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp8
-rw-r--r--kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp8
-rw-r--r--kmymoney2/mymoney/storage/mymoneystoragesql.cpp14
-rw-r--r--kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp2
-rw-r--r--kmymoney2/reports/objectinfotable.cpp2
-rw-r--r--kmymoney2/reports/pivottable.cpp8
-rw-r--r--kmymoney2/views/kgloballedgerview.cpp34
-rw-r--r--kmymoney2/views/khomeview.cpp16
-rw-r--r--kmymoney2/views/kinvestmentview.cpp4
-rw-r--r--kmymoney2/views/kmymoneyview.cpp24
-rw-r--r--kmymoney2/views/kscheduledview.cpp2
-rw-r--r--kmymoney2/widgets/kaccounttemplateselector.cpp4
-rw-r--r--kmymoney2/widgets/kmymoneyaccountcombo.cpp2
-rw-r--r--kmymoney2/widgets/register.cpp4
-rw-r--r--libkgpgfile/kgpgfile.cpp2
31 files changed, 197 insertions, 196 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32feca8..4904dd4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,7 +66,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings
-add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST -UTQT_NO_COMPAT -UTQT_NO_STL )
+add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST -UTQT_NO_STL )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
diff --git a/kmymoney2/converter/mymoneygncreader.cpp b/kmymoney2/converter/mymoneygncreader.cpp
index 14d7b03..7e30f41 100644
--- a/kmymoney2/converter/mymoneygncreader.cpp
+++ b/kmymoney2/converter/mymoneygncreader.cpp
@@ -236,9 +236,9 @@ TQString GncObject::hide (TQString data, unsigned int anonClass) {
// dump current object data values // only called if gncdebug set
void GncObject::debugDump () {
uint i;
- tqDebug ("Object %s", m_elementName.latin1());
+ tqDebug(TQString("Object %1").arg(m_elementName));
for (i = 0; i < m_dataElementListCount; i++) {
- tqDebug ("%s = %s", m_dataElementList[i].latin1(), m_v.at(i)->latin1());
+ tqDebug(TQString("%1 = %2").arg(m_dataElementList[i]).arg(*(m_v.at(i))));
}
}
//*****************************************************************
@@ -409,7 +409,7 @@ void GncCountData::terminate () {
if (i != 0) {
if (m_countType == "budget") pMain->setBudgetsFound(true);
else if (m_countType.left(7) == "gnc:Gnc") pMain->setSmallBusinessFound(true);
- else if (pMain->xmldebug) tqDebug ("Unknown count type %s", m_countType.latin1());
+ else if (pMain->xmldebug) tqDebug(TQString("Unknown count type %1").arg(m_countType));
}
return ;
}
@@ -887,7 +887,7 @@ bool XmlReader::startDocument() {
bool XmlReader::startElement (const TQString&, const TQString&, const TQString& elName ,
const TQXmlAttributes& elAttrs) {
try {
- if (pMain->gncdebug) tqDebug ("XML start - %s", elName.latin1());
+ if (pMain->gncdebug) tqDebug(TQString("XML start - %1").arg(elName));
#ifdef _GNCFILEANON
int i;
TQString spaces;
@@ -938,9 +938,9 @@ bool XmlReader::startElement (const TQString&, const TQString&, const TQString&
#ifndef _GNCFILEANON
// we can't pass on exceptions here coz the XML reader won't catch them and we just abort
KMessageBox::error(0, i18n("Import failed:\n\n%1").arg(e->what()), PACKAGE);
- tqFatal ("%s", e->what().latin1());
+ tqFatal(e->what());
#else
- tqFatal ("%s", e->latin1());
+ tqFatal(e);
#endif // _GNCFILEANON
}
return true; // to keep compiler happy
@@ -948,7 +948,7 @@ bool XmlReader::startElement (const TQString&, const TQString&, const TQString&
bool XmlReader::endElement( const TQString&, const TQString&, const TQString&elName ) {
try {
- if (pMain->xmldebug) tqDebug ("XML end - %s", elName.latin1());
+ if (pMain->xmldebug) tqDebug(TQString("XML end - %1").arg(elName));
#ifdef _GNCFILEANON
TQString spaces;
switch (lastType) {
@@ -973,9 +973,9 @@ bool XmlReader::endElement( const TQString&, const TQString&, const TQString&elN
#ifndef _GNCFILEANON
// we can't pass on exceptions here coz the XML reader won't catch them and we just abort
KMessageBox::error(0, i18n("Import failed:\n\n%1").arg(e->what()), PACKAGE);
- tqFatal ("%s", e->what().latin1());
+ tqFatal(e->what());
#else
- tqFatal ("%s", e->latin1());
+ tqFatal(e);
#endif // _GNCFILEANON
}
return (true); // to keep compiler happy
@@ -985,7 +985,7 @@ bool XmlReader::characters (const TQString &data) {
if (pMain->xmldebug) tqDebug ("XML Data received - %d bytes", data.length());
TQString pData = data.stripWhiteSpace(); // data may contain line feeds and indentation spaces
if (!pData.isEmpty()) {
- if (pMain->developerDebug) tqDebug ("XML Data - %s", pData.latin1());
+ if (pMain->developerDebug) tqDebug(TQString("XML Data - %1").arg(pData));
m_co->storeData (pData); //go store it
#ifdef _GNCFILEANON
TQString anonData = m_co->getData ();
@@ -1063,7 +1063,7 @@ void MyMoneyGncReader::readFile(TQIODevice* pDevice, IMyMoneySerialize* storage)
ft.commit();
} catch (MyMoneyException *e) {
KMessageBox::error(0, i18n("Import failed:\n\n%1").arg(e->what()), PACKAGE);
- tqFatal ("%s", e->what().latin1());
+ tqFatal(e->what());
} // end catch
signalProgress (0, 1, i18n("Import complete")); // switch off progress bar
delete m_xr;
@@ -1085,7 +1085,7 @@ void MyMoneyGncReader::readFile(TQString in, TQString out) {
try {
m_xr->processFile (&pDevice);
} catch (MyMoneyException *e) {
- tqFatal ("%s", e->latin1());
+ tqFatal(e);
} // end catch
delete m_xr;
pDevice.close();
@@ -1149,7 +1149,7 @@ void MyMoneyGncReader::convertCommodity (const GncCommodity *gcm) {
m_storage->addSecurity(equ);
//assign the gnucash id as the key into the map to find our id
- if (gncdebug) tqDebug ("mapping, key = %s, id = %s", gcm->id().latin1(), equ.id().data());
+ if (gncdebug) tqDebug(TQString("mapping, key = %1, id = %2").arg(gcm->id()).arg(equ.id()));
m_mapEquities[gcm->id().utf8()] = equ.id();
}
signalProgress (++m_commodityCount, 0);
@@ -1168,8 +1168,8 @@ void MyMoneyGncReader::convertPrice (const GncPrice *gpr) {
m_storage->addPrice (exchangeRate);
} else {
MyMoneySecurity e = m_storage->security(m_mapEquities[gpr->commodity()->id().utf8()]);
- if (gncdebug) tqDebug ("Searching map, key = %s, found id = %s",
- gpr->commodity()->id().latin1(), e.id().data());
+ if (gncdebug) tqDebug(TQString("Searching map, key = %1, found id = %2").
+ arg(gpr->commodity()->id()).arg(e.id()));
e.setTradingCurrency (gpr->currency()->id().utf8());
MyMoneyPrice stockPrice(e.id(), gpr->currency()->id().utf8(), gpr->priceDate(), rate, i18n("Imported History"));
m_storage->addPrice (stockPrice);
@@ -1272,12 +1272,12 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
m_stockList.append (gac->id());
// set the equity type
MyMoneySecurity e = m_storage->security (m_mapEquities[gac->commodity()->id().utf8()]);
- if (gncdebug) tqDebug ("Acct equity search, key = %s, found id = %s",
- gac->commodity()->id().latin1(), e.id().data());
+ if (gncdebug) tqDebug(TQString("Acct equity search, key = %1, found id = %2").
+ arg(gac->commodity()->id()).arg(e.id()));
acc.setCurrencyId (e.id()); // actually, the security id
if ("MUTUAL" == gac->type()) {
e.setSecurityType (MyMoneySecurity::SECURITY_MUTUALFUND);
- if (gncdebug) tqDebug ("Setting %s to mutual", e.name().latin1());
+ if (gncdebug) tqDebug(TQString("Setting %1 to mutual").arg(e.name()));
m_storage->modifySecurity (e);
}
// See if he wants online quotes for this account
@@ -1313,9 +1313,10 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
m_storage->addAccount(acc);
m_mapIds[gac->id().utf8()] = acc.id(); // to link gnucash id to ours for tx posting
- if (gncdebug) tqDebug("Gnucash account %s has id of %s, type of %s, parent is %s",
- gac->id().latin1(), acc.id().data(),
- KMyMoneyUtils::accountTypeToString(acc.accountType()).latin1(), acc.parentAccountId().data());
+ if (gncdebug) tqDebug(TQString("Gnucash account %1 has id of %2, type of %3, parent is %4").
+ arg(gac->id()).arg(acc.id()).
+ arg(KMyMoneyUtils::accountTypeToString(acc.accountType())).
+ arg(acc.parentAccountId()));
signalProgress (++m_accountCount, 0);
return ;
@@ -1403,9 +1404,9 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) {
splitAccount = m_storage->account (kmmAccountId);
// print some data so we can maybe identify this split later
// TODO : prints personal data
- //if (gncdebug) tqDebug ("Split data - gncid %s, kmmid %s, memo %s, value %s, recon state %s",
- // gsp->acct().latin1(), kmmAccountId.data(), gsp->memo().latin1(), gsp->value().latin1(),
- // gsp->recon().latin1());
+ //if (gncdebug) tqDebug(TQString("Split data - gncid %1, kmmid %2, memo %3, value %4, recon state %5").
+ // arg(gsp->acct()).arg(kmmAccountId).arg(gsp->memo()).arg(gsp->value()).
+ // arg(gsp->recon()));
// payee id
split.setPayeeId (m_txPayeeId.utf8());
// reconciled state and date
@@ -1467,9 +1468,9 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) {
// we can't use m_storage->security coz security list is not built yet
m_storage->currency(m_txCommodity); // will throw exception if not currency
e.setTradingCurrency (m_txCommodity);
- if (gncdebug) tqDebug ("added price for %s, %s date %s",
- e.name().latin1(), newPrice.toString().latin1(),
- TQString(m_txDatePosted.toString(Qt::ISODate)).latin1());
+ if (gncdebug) tqDebug(TQString("added price for %1, %2 date %3").
+ arg(e.name()).arg(newPrice.toString()).
+ arg(m_txDatePosted.toString(Qt::ISODate)));
m_storage->modifySecurity(e);
MyMoneyPrice dealPrice (e.id(), m_txCommodity, m_txDatePosted, newPrice, i18n("Imported Transaction"));
m_storage->addPrice (dealPrice);
@@ -1631,8 +1632,8 @@ void MyMoneyGncReader::convertTemplateSplit (const TQString& schedName, const Gn
}
// all data read, now check we have everything
if ((bFoundStringCreditFormula) && (bFoundStringDebitFormula) && (bFoundGuidAccountId)) {
- if (gncdebug) tqDebug ("Found valid slot; credit %s, debit %s, acct %s",
- gncCreditFormula.latin1(), gncDebitFormula.latin1(), gncAccountId.latin1());
+ if (gncdebug) tqDebug(TQString("Found valid slot; credit %1, debit %2, acct %3").
+ arg(gncCreditFormula).arg(gncDebitFormula).arg(gncAccountId));
validSlotCount++;
}
// validate numeric, work out sign
@@ -1657,7 +1658,7 @@ void MyMoneyGncReader::convertTemplateSplit (const TQString& schedName, const Gn
exFormula = numericTest;
}
} else {
- if (gncdebug) tqDebug ("%s is not numeric", numericTest.latin1());
+ if (gncdebug) tqDebug(TQString("%1 is not numeric").arg(numericTest));
nonNumericFormula = true;
}
split.setValue (exFormula);
@@ -1901,7 +1902,7 @@ void MyMoneyGncReader::terminate () {
// this code is just temporary to show us what is in the file.
if (gncdebug) tqDebug("%d accounts found in the GnuCash file", (unsigned int)m_mapIds.count());
for (map_accountIds::Iterator it = m_mapIds.begin(); it != m_mapIds.end(); ++it) {
- if (gncdebug) tqDebug("key = %s, value = %s", it.key().data(), it.data().data());
+ if (gncdebug) tqDebug(TQString("key = %1, value = %2").arg(it.key()).arg(it.data()));
}
// first step is to implement the users investment option, now we
// have all the accounts available
@@ -1919,34 +1920,34 @@ void MyMoneyGncReader::terminate () {
if ((*acc).parentAccountId() == m_storage->asset().id()) {
MyMoneyAccount assets = m_storage->asset();
m_storage->addAccount(assets, (*acc));
- if (gncdebug) tqDebug("Account id %s is a child of the main asset account", (*acc).id().data());
+ if (gncdebug) tqDebug(TQString("Account id %1 is a child of the main asset account").arg((*acc).id()));
} else if ((*acc).parentAccountId() == m_storage->liability().id()) {
MyMoneyAccount liabilities = m_storage->liability();
m_storage->addAccount(liabilities, (*acc));
- if (gncdebug) tqDebug("Account id %s is a child of the main liability account", (*acc).id().data());
+ if (gncdebug) tqDebug(TQString("Account id %1 is a child of the main liability account").arg((*acc).id()));
} else if ((*acc).parentAccountId() == m_storage->income().id()) {
MyMoneyAccount incomes = m_storage->income();
m_storage->addAccount(incomes, (*acc));
- if (gncdebug) tqDebug("Account id %s is a child of the main income account", (*acc).id().data());
+ if (gncdebug) tqDebug(TQString("Account id %1 is a child of the main income account").arg((*acc).id()));
} else if ((*acc).parentAccountId() == m_storage->expense().id()) {
MyMoneyAccount expenses = m_storage->expense();
m_storage->addAccount(expenses, (*acc));
- if (gncdebug) tqDebug("Account id %s is a child of the main expense account", (*acc).id().data());
+ if (gncdebug) tqDebug(TQString("Account id %1 is a child of the main expense account").arg((*acc).id()));
} else if ((*acc).parentAccountId() == m_storage->equity().id()) {
MyMoneyAccount equity = m_storage->equity();
m_storage->addAccount(equity, (*acc));
- if (gncdebug) tqDebug("Account id %s is a child of the main equity account", (*acc).id().data());
+ if (gncdebug) tqDebug(TQString("Account id %1 is a child of the main equity account").arg((*acc).id()));
} else if ((*acc).parentAccountId() == m_rootId) {
- if (gncdebug) tqDebug("Account id %s is a child of root", (*acc).id().data());
+ if (gncdebug) tqDebug(TQString("Account id %1 is a child of root").arg((*acc).id()));
} else {
// it is not under one of the main accounts, so find gnucash parent
TQString parentKey = (*acc).parentAccountId();
- if (gncdebug) tqDebug ("acc %s, parent %s", (*acc).id().data(),
- (*acc).parentAccountId().data());
+ if (gncdebug) tqDebug(TQString("acc %1, parent %2").arg((*acc).id()).
+ arg((*acc).parentAccountId()));
map_accountIds::Iterator id = m_mapIds.find(parentKey);
if (id != m_mapIds.end()) {
- if (gncdebug) tqDebug("Setting account id %s's parent account id to %s",
- (*acc).id().data(), id.data().data());
+ if (gncdebug) tqDebug(TQString("Setting account id %1's parent account id to %1").
+ arg((*acc).id()).arg(id.data()));
MyMoneyAccount parent = m_storage->account(id.data());
parent = checkConsistency (parent, (*acc));
m_storage->addAccount (parent, (*acc));
@@ -2074,13 +2075,13 @@ TQString MyMoneyGncReader::buildReportSection (const TQString& source) {
}
if (more) s.append (i18n("\n\nPress More for further information"));
} else { // we need to retrieve the posted messages for this source
- if (gncdebug) tqDebug("Building messages for source %s", source.latin1());
+ if (gncdebug) tqDebug(TQString("Building messages for source %1").arg(source));
unsigned int i, j;
for (i = 0; i < m_messageList.count(); i++) {
GncMessageArgs *m = m_messageList.at(i);
if (m->source == source) {
- if (gncdebug) tqDebug("%s", TQString("build text source %1, code %2, argcount %3")
- .arg(m->source).arg(m->code).arg(m->args.count()).data());
+ if (gncdebug) tqDebug(TQString("build text source %1, code %2, argcount %3")
+ .arg(m->source).arg(m->code).arg(m->args.count()));
TQString ss = GncMessages::text (m->source, m->code);
// add variable args. the .arg function seems always to replace the
// lowest numbered placeholder it finds, so translating messages
@@ -2090,7 +2091,7 @@ TQString MyMoneyGncReader::buildReportSection (const TQString& source) {
}
}
}
- if (gncdebug) tqDebug ("%s", s.latin1());
+ if (gncdebug) tqDebug(s);
return (static_cast<const TQString>(s));
PASS
}
@@ -2220,9 +2221,9 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) {
invAcc.setParentAccountId (parentKey); // intersperse it between old parent and child stock acct
m_storage->addAccount (invAcc);
m_mapIds [invAcc.id()] = invAcc.id(); // so stock account gets parented (again) to investment account later
- if (gncdebug) tqDebug ("Created investment account %s as id %s, parent %s", invAcc.name().data(), invAcc.id().data(),
- invAcc.parentAccountId().data());
- if (gncdebug) tqDebug ("Setting stock %s, id %s, as child of %s", stockAcc.name().data(), stockAcc.id().data(), invAcc.id().data());
+ if (gncdebug) tqDebug(TQString("Created investment account %1 as id %2, parent %3").arg(invAcc.name()).arg(invAcc.id()).
+ arg(invAcc.parentAccountId()));
+ if (gncdebug) tqDebug(TQString("Setting stock %1, id %2, as child of %3").arg(stockAcc.name()).arg(stockAcc.id()).arg(invAcc.id()));
stockAcc.setParentAccountId (invAcc.id());
m_storage->addAccount(invAcc, stockAcc);
// investment option 1 creates a single investment account for all stocks
@@ -2243,8 +2244,8 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) {
singleInvAcc.setParentAccountId (m_storage->asset().id());
m_storage->addAccount (singleInvAcc);
m_mapIds [singleInvAcc.id()] = singleInvAcc.id(); // so stock account gets parented (again) to investment account later
- if (gncdebug) tqDebug ("Created investment account %s as id %s, parent %s, reparenting stock",
- singleInvAcc.name().data(), singleInvAcc.id().data(), singleInvAcc.parentAccountId().data());
+ if (gncdebug) tqDebug(TQString("Created investment account %1 as id %2, parent %3, reparenting stock").
+ arg(singleInvAcc.name()).arg(singleInvAcc.id()).arg(singleInvAcc.parentAccountId()));
singleInvAccId = singleInvAcc.id();
} else { // the account has already been created
singleInvAcc = m_storage->account (singleInvAccId);
@@ -2397,8 +2398,8 @@ void MyMoneyGncReader::postMessage (const TQString& source, const unsigned int c
// get the number of args this message requires
const unsigned int argCount = GncMessages::argCount (source, code);
if ((gncdebug) && (argCount != argList.count()))
- tqDebug("%s", TQString("MyMoneyGncReader::postMessage debug: Message %1, code %2, requires %3 arguments, got %4")
- .arg(source).arg(code).arg(argCount).arg(argList.count()).data());
+ tqDebug(TQString("MyMoneyGncReader::postMessage debug: Message %1, code %2, requires %3 arguments, got %4")
+ .arg(source).arg(code).arg(argCount).arg(argList.count()));
// store the arguments
for (i = 0; i < argCount; i++) {
if (i > argList.count()) m->args.append(TQString());
diff --git a/kmymoney2/converter/mymoneyqifprofile.cpp b/kmymoney2/converter/mymoneyqifprofile.cpp
index a38b687..efee9c7 100644
--- a/kmymoney2/converter/mymoneyqifprofile.cpp
+++ b/kmymoney2/converter/mymoneyqifprofile.cpp
@@ -477,7 +477,7 @@ const TQDate MyMoneyQifProfile::date(const TQString& datein) const
}
}
if(j == 13) {
- tqWarning("Unknown month '%s'", scannedParts[d->m_partPos['m']].data());
+ tqWarning(TQString("Unknown month '%1'").arg(scannedParts[d->m_partPos['m']]));
return TQDate();
}
}
@@ -573,8 +573,8 @@ const TQDate MyMoneyQifProfile::date(const TQString& datein) const
for(i = 0; i < 2; ++i) {
if(scannedDelim[i] != formatDelim[i]
&& scannedDelim[i] != TQChar('\'')) {
- tqWarning("MyMoneyQifProfile::date(const TQString& datein) Invalid delimiter '%s' when '%s' was expected",
- scannedDelim[i].latin1(), formatDelim[i].latin1());
+ tqWarning(TQString("MyMoneyQifProfile::date(const TQString& datein) Invalid delimiter '%1' when '%2' was expected").
+ arg(scannedDelim[i]).arg(formatDelim[i]));
return TQDate();
}
}
@@ -658,7 +658,7 @@ const TQDate MyMoneyQifProfile::date(const TQString& datein) const
break;
}
if(!msg.isEmpty()) {
- tqWarning("MyMoneyQifProfile::date(const TQString& datein) %s",msg.latin1());
+ tqWarning(TQString("MyMoneyQifProfile::date(const TQString& datein) %1").arg(msg));
return TQDate();
}
}
diff --git a/kmymoney2/converter/mymoneyqifreader.cpp b/kmymoney2/converter/mymoneyqifreader.cpp
index 9f68d85..614788f 100644
--- a/kmymoney2/converter/mymoneyqifreader.cpp
+++ b/kmymoney2/converter/mymoneyqifreader.cpp
@@ -336,7 +336,7 @@ void MyMoneyQifReader::slotImportFinished(void)
if(!m_lineBuffer.isEmpty()) {
m_qifLines << TQString::fromUtf8(m_lineBuffer.stripWhiteSpace());
}
- tqDebug("Read %d bytes", m_pos);
+ tqDebug("Read %ld bytes", m_pos);
TQTimer::singleShot(0, this, TQT_SLOT(slotProcessData()));
}
@@ -365,13 +365,13 @@ void MyMoneyQifReader::slotProcessData(void)
m_qifProfile.setInputDateFormat(list.first());
- tqDebug("Selected date format: '%s'", list.first().data());
+ tqDebug(TQString("Selected date format: '%1'").arg(list.first()));
signalProgress(0, m_qifLines.count(), i18n("Importing QIF ..."));
TQStringList::iterator it;
for(it = m_qifLines.begin(); m_userAbort == false && it != m_qifLines.end(); ++it) {
++m_linenumber;
- // tqDebug("Proc: '%s'", (*it).data());
+ // tqDebug(TQString("Proc: '%1'").arg(*it));
if((*it).startsWith("!")) {
processQifSpecial(*it);
m_qifEntry.clear();
@@ -621,7 +621,7 @@ void MyMoneyQifReader::processQifSpecial(const TQString& _line)
m_entryType = EntrySkip;
} else {
- tqWarning("Unknown export header '!Type:%s' in QIF file on line %d: Skipping section.", line.data(), m_linenumber);
+ tqWarning(TQString("Unknown export header '!Type:%1' in QIF file on line %2: Skipping section.").arg(line).arg(m_linenumber));
m_entryType = EntrySkip;
}
@@ -1017,7 +1017,7 @@ void MyMoneyQifReader::processTransactionEntry(void)
h = MyMoneyTransaction::hash(m_qifEntry.join(";"));
TQString hashBase;
- hashBase.sprintf("%s-%07lx", m_qifProfile.date(extractLine('D')).toString(Qt::ISODate).data(), h);
+ hashBase.sprintf("%s-%07lx", m_qifProfile.date(extractLine('D')).toString(Qt::ISODate).latin1(), h);
int idx = 1;
TQString hash;
for(;;) {
@@ -1172,7 +1172,7 @@ void MyMoneyQifReader::processTransactionEntry(void)
}
} catch (MyMoneyException *e) {
- kdDebug(0) << "Line " << m_linenumber << ": Account with id " << accountId.data() << " not found" << endl;
+ kdDebug(0) << "Line " << m_linenumber << ": Account with id " << accountId << " not found" << endl;
accountId = TQString();
delete e;
}
@@ -1231,7 +1231,7 @@ void MyMoneyQifReader::processTransactionEntry(void)
}
} catch (MyMoneyException *e) {
- kdDebug(0) << "Line " << m_linenumber << ": Account with id " << accountId.data() << " not found" << endl;
+ kdDebug(0) << "Line " << m_linenumber << ": Account with id " << accountId << " not found" << endl;
accountId = TQString();
delete e;
}
@@ -1327,7 +1327,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void)
h = MyMoneyTransaction::hash(m_qifEntry.join(";"));
TQString hashBase;
- hashBase.sprintf("%s-%07lx", m_qifProfile.date(extractLine('D')).toString(Qt::ISODate).data(), h);
+ hashBase.sprintf("%s-%07lx", m_qifProfile.date(extractLine('D')).toString(Qt::ISODate).latin1(), h);
int idx = 1;
TQString hash;
for(;;) {
@@ -1994,7 +1994,7 @@ TQString MyMoneyQifReader::processAccountEntry(bool resetAccountId)
TQString tmp;
account.setName(extractLine('N'));
- // tqDebug("Process account '%s'", account.name().data());
+ // tqDebug(TQString("Process account '%1'").arg(account.name()));
account.setDescription(extractLine('D'));
diff --git a/kmymoney2/converter/mymoneystatementreader.cpp b/kmymoney2/converter/mymoneystatementreader.cpp
index 6b36888..15f29f8 100644
--- a/kmymoney2/converter/mymoneystatementreader.cpp
+++ b/kmymoney2/converter/mymoneystatementreader.cpp
@@ -237,7 +237,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes
try {
m_account = MyMoneyFile::instance()->account(s.m_accountId);
} catch(MyMoneyException* e) {
- tqDebug("Received reference '%s' to unknown account in statement", s.m_accountId.data());
+ tqDebug(TQString("Received reference '%1' to unknown account in statement").arg(s.m_accountId));
delete e;
}
}
@@ -299,7 +299,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes
else if(s.m_listTransactions.count() == 0)
messages += i18n("Importing statement without transactions");
- tqDebug("Importing statement for '%s'", m_account.name().data());
+ tqDebug(TQString("Importing statement for '%1'").arg(m_account.name()));
//
// Process the securities
@@ -322,7 +322,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes
if ( !m_userAbort )
{
try {
- tqDebug("Processing transactions (%s)", m_account.name().data());
+ tqDebug(TQString("Processing transactions (%1)").arg(m_account.name()));
signalProgress(0, s.m_listTransactions.count(), "Importing Statement ...");
int progress = 0;
TQValueList<MyMoneyStatement::Transaction>::const_iterator it_t = s.m_listTransactions.begin();
@@ -332,13 +332,13 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes
signalProgress(++progress, 0);
++it_t;
}
- tqDebug("Processing transactions done (%s)", m_account.name().data());
+ tqDebug(TQString("Processing transactions done (%1)").arg(m_account.name()));
} catch(MyMoneyException* e) {
if(e->what() == "USERABORT")
m_userAbort = true;
else
- tqDebug("Caught exception from processTransactionEntry() not caused by USERABORT: %s", e->what().data());
+ tqDebug(TQString("Caught exception from processTransactionEntry() not caused by USERABORT: %1").arg(e->what()));
delete e;
}
signalProgress(-1, -1);
@@ -369,7 +369,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes
if(e->what() == "USERABORT")
m_userAbort = true;
else
- tqDebug("Caught exception from processPriceEntry() not caused by USERABORT: %s", e->what().data());
+ tqDebug(TQString("Caught exception from processPriceEntry() not caused by USERABORT: %1").arg(e->what()));
delete e;
}
signalProgress(-1, -1);
@@ -423,7 +423,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes
delete m_ft;
m_ft = 0;
- tqDebug("Importing statement for '%s' done", m_account.name().data());
+ tqDebug(TQString("Importing statement for '%1' done").arg(m_account.name()));
return rc;
}
@@ -505,7 +505,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
#if 0
TQString dbgMsg;
dbgMsg = TQString("Process %1, '%3', %2").arg(t_in.m_datePosted.toString(Qt::ISODate)).arg(t_in.m_amount.formatMoney("", 2)).arg(t_in.m_strBankID);
- tqDebug("%s", dbgMsg.data());
+ tqDebug(dbgMsg);
#endif
// mark it imported for the view
@@ -962,7 +962,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
try {
file->addPayee(payee);
- tqDebug("Payee '%s' created", payee.name().data());
+ tqDebug(TQString("Payee '%1' created").arg(payee.name()));
d->payees << payee;
payeeid = payee.id();
s1.setPayeeId(payeeid);
@@ -1161,7 +1161,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
break;
case TransactionMatcher::matched:
case TransactionMatcher::matchedExact:
- tqDebug("Detected as match to transaction '%s'", tm.id().data());
+ tqDebug(TQString("Detected as match to transaction '%1'").arg(tm.id()));
matcher.match(tm, matchedSplit, t, s1, true);
d->transactionsMatched++;
break;
@@ -1230,7 +1230,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
delete o;
} catch (MyMoneyException *e) {
TQString message(i18n("Problem adding or matching imported transaction with id '%1': %2").arg(t_in.m_strBankID).arg(e->what()));
- tqDebug("%s", message.data());
+ tqDebug(message);
delete e;
int result = KMessageBox::warningContinueCancel(0, message);
diff --git a/kmymoney2/dialogs/investactivities.cpp b/kmymoney2/dialogs/investactivities.cpp
index 2c348dd..d9bd7ca 100644
--- a/kmymoney2/dialogs/investactivities.cpp
+++ b/kmymoney2/dialogs/investactivities.cpp
@@ -159,7 +159,7 @@ void Activity::setLabelText(const TQString& idx, const TQString& txt) const
if(w) {
w->setText(txt);
} else {
- tqDebug("Unknown TQLabel named '%s'", idx.data());
+ tqDebug(TQString("Unknown TQLabel named '%1'").arg(idx));
}
}
diff --git a/kmymoney2/dialogs/kendingbalancedlg.cpp b/kmymoney2/dialogs/kendingbalancedlg.cpp
index 0e692c0..71e497d 100644
--- a/kmymoney2/dialogs/kendingbalancedlg.cpp
+++ b/kmymoney2/dialogs/kendingbalancedlg.cpp
@@ -199,24 +199,24 @@ void KEndingBalanceDlg::slotUpdateBalances(void)
balance = balance * factor;
endBalance = startBalance = balance;
- tracer.printf("total balance = %s", endBalance.formatMoney("", 2).data());
+ tracer.printf("total balance = %s", endBalance.formatMoney("", 2).local8Bit().data());
for(it = transactionList.begin(); it != transactionList.end(); ++it) {
const MyMoneySplit& split = (*it).second;
balance -= split.shares() * factor;
if((*it).first.postDate() > m_statementDate->date()) {
- tracer.printf("Reducing balances by %s because postdate of %s/%s(%s) is past statement date", (split.shares() * factor).formatMoney("", 2).data(), (*it).first.id().data(),split.id().data(), (*it).first.postDate().toString(Qt::ISODate).data());
+ tracer.printf("Reducing balances by %s because postdate of %s/%s(%s) is past statement date", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), (*it).first.id().local8Bit().data(),split.id().local8Bit().data(), (*it).first.postDate().toString(Qt::ISODate).local8Bit().data());
endBalance -= split.shares() * factor;
startBalance -= split.shares() * factor;
} else {
switch(split.reconcileFlag()) {
case MyMoneySplit::NotReconciled:
- tracer.printf("Reducing balances by %s because %s/%s(%s) is not reconciled", (split.shares() * factor).formatMoney("", 2).data(), (*it).first.id().data(), split.id().data(), (*it).first.postDate().toString(Qt::ISODate).data());
+ tracer.printf("Reducing balances by %s because %s/%s(%s) is not reconciled", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), (*it).first.id().local8Bit().data(), split.id().local8Bit().data(), (*it).first.postDate().toString(Qt::ISODate).local8Bit().data());
endBalance -= split.shares() * factor;
startBalance -= split.shares() * factor;
break;
case MyMoneySplit::Cleared:
- tracer.printf("Reducing start balance by %s because %s/%s(%s) is cleared", (split.shares() * factor).formatMoney("", 2).data(), (*it).first.id().data(), split.id().data(), (*it).first.postDate().toString(Qt::ISODate).data());
+ tracer.printf("Reducing start balance by %s because %s/%s(%s) is cleared", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), (*it).first.id().local8Bit().data(), split.id().local8Bit().data(), (*it).first.postDate().toString(Qt::ISODate).local8Bit().data());
startBalance -= split.shares() * factor;
break;
default:
@@ -226,8 +226,8 @@ void KEndingBalanceDlg::slotUpdateBalances(void)
}
m_previousBalance->setValue(startBalance);
m_endingBalance->setValue(endBalance);
- tracer.printf("total balance = %s", endBalance.formatMoney("", 2).data());
- tracer.printf("start balance = %s", startBalance.formatMoney("", 2).data());
+ tracer.printf("total balance = %s", endBalance.formatMoney("", 2).local8Bit().data());
+ tracer.printf("start balance = %s", startBalance.formatMoney("", 2).local8Bit().data());
m_interestDateEdit->setDate(m_statementDate->date());
m_chargesDateEdit->setDate(m_statementDate->date());
@@ -366,7 +366,7 @@ bool KEndingBalanceDlg::createTransaction(MyMoneyTransaction &t, const int sign,
t.modifySplit(s2);
} catch(MyMoneyException *e) {
- tqDebug("%s", e->what().data());
+ tqDebug(e->what());
delete e;
t = MyMoneyTransaction();
return false;
@@ -594,7 +594,7 @@ const MyMoneyTransaction KEndingBalanceLoanDlg::adjustmentTransaction(void) cons
t.setPostDate(m_endDateEdit->date());
} catch(MyMoneyException *e) {
- tqDebug("Unable to create adjustment transaction for loan reconciliation: %s", e->what().data());
+ tqDebug(TQString("Unable to create adjustment transaction for loan reconciliation: %1").arg(e->what()));
delete e;
return MyMoneyTransaction();
}
diff --git a/kmymoney2/dialogs/kequitypriceupdatedlg.cpp b/kmymoney2/dialogs/kequitypriceupdatedlg.cpp
index 8679d0c..c32e500 100644
--- a/kmymoney2/dialogs/kequitypriceupdatedlg.cpp
+++ b/kmymoney2/dialogs/kequitypriceupdatedlg.cpp
@@ -369,7 +369,7 @@ void KEquityPriceUpdateDlg::storePrices(void)
ft.commit();
} catch(MyMoneyException *e) {
- tqDebug("Unable to add price information for %s", name.data());
+ tqDebug(TQString("Unable to add price information for %1").arg(name));
delete e;
}
}
diff --git a/kmymoney2/dialogs/transactioneditor.cpp b/kmymoney2/dialogs/transactioneditor.cpp
index 3456a93..b63e8c1 100644
--- a/kmymoney2/dialogs/transactioneditor.cpp
+++ b/kmymoney2/dialogs/transactioneditor.cpp
@@ -285,7 +285,7 @@ int TransactionEditor::slotEditSplits(void)
*m_transactionPtr = k;
}
} catch(MyMoneyException *e) {
- tqDebug("Unable to update commodity to second splits currency in %s: '%s'", m_transaction.id().data(), e->what().data());
+ tqDebug(TQString("Unable to update commodity to second splits currency in %1: '%2'").arg(m_transaction.id()).arg(e->what()));
delete e;
}
@@ -361,7 +361,7 @@ bool TransactionEditor::fixTransactionCommodity(const MyMoneyAccount& account)
(*it_t).transaction().modifySplit(splitB);
} catch(MyMoneyException *e) {
- tqDebug("Unable to update commodity to second splits currency in %s: '%s'", (*it_t).transaction().id().data(), e->what().data());
+ tqDebug(TQString("Unable to update commodity to second splits currency in %1: '%2'").arg((*it_t).transaction().id()).arg(e->what()));
delete e;
}
break;
@@ -398,7 +398,7 @@ bool TransactionEditor::fixTransactionCommodity(const MyMoneyAccount& account)
(*it_t).transaction().modifySplit(splitB);
} catch(MyMoneyException *e) {
- tqDebug("Unable to update commodity to second splits currency in %s: '%s'", (*it_t).transaction().id().data(), e->what().data());
+ tqDebug(TQString("Unable to update commodity to second splits currency in %1: '%2'").arg((*it_t).transaction().id()).arg(e->what()));
delete e;
}
break;
@@ -444,7 +444,7 @@ bool TransactionEditor::fixTransactionCommodity(const MyMoneyAccount& account)
}
}
} catch(MyMoneyException *e) {
- tqDebug("Unable to update commodity of split currency in %s: '%s'", (*it_t).transaction().id().data(), e->what().data());
+ tqDebug(TQString("Unable to update commodity of split currency in %1: '%2'").arg((*it_t).transaction().id()).arg(e->what()));
delete e;
}
break;
@@ -711,7 +711,7 @@ bool TransactionEditor::enterTransactions(TQString& newId, bool askForSchedule,
}
}
} catch(MyMoneyException * e) {
- tqDebug("Unable to store transaction within engine: %s", e->what().latin1());
+ tqDebug(TQString("Unable to store transaction within engine: %1").arg(e->what()));
delete e;
newTransactionCreated = false;
}
@@ -1447,7 +1447,7 @@ void StdTransactionEditor::slotUpdateCashFlow(KMyMoneyRegister::CashFlowDirectio
void StdTransactionEditor::slotUpdateCategory(const TQString& id)
{
TQLabel *categoryLabel = dynamic_cast<TQLabel*>(haveWidget("category-label"));
- // tqDebug("Update category to %s", id.data());
+ // tqDebug(TQString("Update category to %1").arg(id));
if(categoryLabel) {
TabBar* tabbar = dynamic_cast<TabBar*>(haveWidget("tabbar"));
@@ -1526,7 +1526,7 @@ void StdTransactionEditor::slotUpdateDeposit(const TQString& txt)
void StdTransactionEditor::slotUpdateAmount(const TQString& txt)
{
- // tqDebug("Update amount to %s", txt.data());
+ // tqDebug(TQString("Update amount to %1").arg(txt));
MyMoneyMoney val(txt);
updateAmount(val);
updateVAT(true);
@@ -1661,7 +1661,7 @@ bool StdTransactionEditor::addVatSplit(MyMoneyTransaction& tr, const MyMoneyMone
tax.setAccountId(vatAcc.id());
- // tqDebug("vat amount is '%s'", category.value("VatAmount").latin1());
+ // tqDebug(TQString("vat amount is '%1'").arg(category.value("VatAmount")));
if(category.value("VatAmount").lower() != TQString("net")) {
// split value is the gross value
gv = amount;
diff --git a/kmymoney2/kmymoney2.cpp b/kmymoney2/kmymoney2.cpp
index c54012d..01dbc2c 100644
--- a/kmymoney2/kmymoney2.cpp
+++ b/kmymoney2/kmymoney2.cpp
@@ -516,7 +516,7 @@ TDEAction* KMyMoney2App::action(const TQString& actionName) const
if(p)
return p;
- tqWarning("Action with name '%s' not found!", actionName.latin1());
+ tqWarning(TQString("Action with name '%1' not found!").arg(actionName));
return &dummyAction;
}
@@ -530,13 +530,13 @@ TDEToggleAction* KMyMoney2App::toggleAction(const TQString& actionName) const
if(q) {
TDEToggleAction* p = dynamic_cast<TDEToggleAction*>(q);
if(!p) {
- tqWarning("Action '%s' is not of type TDEToggleAction", actionName.latin1());
+ tqWarning(TQString("Action '%1' is not of type TDEToggleAction").arg(actionName));
p = &dummyAction;
}
return p;
}
- tqWarning("Action with name '%s' not found!", actionName.latin1());
+ tqWarning(TQString("Action with name '%1' not found!").arg(actionName));
return &dummyAction;
}
@@ -2612,7 +2612,7 @@ void KMyMoney2App::slotManualPriceUpdate(void)
// The dialog takes care of adding the price if necessary
calc.exec();
} catch(MyMoneyException* e) {
- tqDebug("Error in price update: %s", e->what().data());
+ tqDebug(TQString("Error in price update: %1").arg(e->what()));
delete e;
}
}
@@ -3057,14 +3057,14 @@ void KMyMoney2App::slotAccountEdit(void)
file->addSchedule(sch);
ft.commit();
} catch (MyMoneyException *f) {
- tqDebug("Cannot add schedule: '%s'", f->what().data());
+ tqDebug(TQString("Cannot add schedule: '%1'").arg(f->what()));
delete f;
}
delete e;
}
} catch(MyMoneyException *e) {
- tqDebug("Unable to modify account %s: '%s'", m_selectedAccount.name().data(),
- e->what().data());
+ tqDebug(TQString("Unable to modify account %1: '%2'").
+ arg(m_selectedAccount.name()).arg(e->what()));
delete e;
}
}
@@ -3143,7 +3143,7 @@ void KMyMoney2App::slotAccountReconcileStart(void)
ft.commit();
} catch(MyMoneyException *e) {
- tqWarning("interest transaction not stored: '%s'", e->what().data());
+ tqWarning(TQString("interest transaction not stored: '%s'").arg(e->what()));
delete e;
}
@@ -5459,7 +5459,7 @@ void KMyMoney2App::slotUpdateActions(void)
action("investment_online_price_update")->setEnabled(true);
} catch(MyMoneyException *e) {
- tqDebug("Error retrieving security for investment %s: %s", m_selectedInvestment.name().data(), e->what().data());
+ tqDebug(TQString("Error retrieving security for investment %1: %2").arg(m_selectedInvestment.name()).arg(e->what()));
delete e;
}
if(m_selectedInvestment.isClosed())
@@ -5620,7 +5620,7 @@ void KMyMoney2App::slotSelectInstitution(const MyMoneyObject& institution)
return;
m_selectedInstitution = dynamic_cast<const MyMoneyInstitution&>(institution);
- // tqDebug("slotSelectInstitution('%s')", m_selectedInstitution.name().data());
+ // tqDebug(TQString("slotSelectInstitution('%1')").arg(m_selectedInstitution.name()));
slotUpdateActions();
emit institutionSelected(m_selectedInstitution);
}
@@ -5635,7 +5635,7 @@ void KMyMoney2App::slotSelectAccount(const MyMoneyObject& obj)
if(!acc.isInvest())
m_selectedAccount = acc;
- // tqDebug("slotSelectAccount('%s')", m_selectedAccount.name().data());
+ // tqDebug(TQString("slotSelectAccount('%1')").arg(m_selectedAccount.name()));
slotUpdateActions();
emit accountSelected(m_selectedAccount);
}
@@ -5645,7 +5645,7 @@ void KMyMoney2App::slotSelectInvestment(const MyMoneyObject& obj)
if(typeid(obj) != typeid(MyMoneyAccount))
return;
- // tqDebug("slotSelectInvestment('%s')", account.name().data());
+ // tqDebug(TQString("slotSelectInvestment('%1')".arg(account.name()));
m_selectedInvestment = MyMoneyAccount();
const MyMoneyAccount& acc = dynamic_cast<const MyMoneyAccount&>(obj);
if(acc.isInvest())
@@ -5657,7 +5657,7 @@ void KMyMoney2App::slotSelectInvestment(const MyMoneyObject& obj)
void KMyMoney2App::slotSelectSchedule(const MyMoneySchedule& schedule)
{
- // tqDebug("slotSelectSchedule('%s')", schedule.name().data());
+ // tqDebug(TQString("slotSelectSchedule('%1')").arg(schedule.name()));
m_selectedSchedule = schedule;
slotUpdateActions();
emit scheduleSelected(m_selectedSchedule);
@@ -6196,7 +6196,7 @@ void KMyMoney2App::Private::unlinkStatementXML(void)
{
TQDir d("/home/thb", "kmm-statement*");
for(int i=0; i < d.count(); ++i) {
- tqDebug("Remove %s", d[i].data());
+ tqDebug(TQString("Remove %1").arg(d[i]));
d.remove(TQString("/home/thb/%1").arg(d[i]));
}
statementXMLindex = 0;
diff --git a/kmymoney2/kmymoneyutils.cpp b/kmymoney2/kmymoneyutils.cpp
index 59386a8..92ac362 100644
--- a/kmymoney2/kmymoneyutils.cpp
+++ b/kmymoney2/kmymoneyutils.cpp
@@ -285,7 +285,7 @@ TQString KMyMoneyUtils::findResource(const char* type, const TQString& filename)
// check that the placeholder is present
if(!filename.find("%1")) {
- tqWarning("%%1 not found in '%s'", filename.latin1());
+ tqWarning(TQString("%%1 not found in '%1'").arg(filename));
return filename;
}
@@ -297,7 +297,7 @@ TQString KMyMoneyUtils::findResource(const char* type, const TQString& filename)
rc = TDEGlobal::dirs()->findResource(type, mask.arg(language));
}
if(rc.isEmpty()) {
- // tqDebug(TQString("html/home_%1.html not found").arg(country).latin1());
+ // tqDebug(TQString("html/home_%1.html not found").arg(country));
rc = TDEGlobal::dirs()->findResource(type, mask.arg(country));
}
if(rc.isEmpty()) {
@@ -305,7 +305,7 @@ TQString KMyMoneyUtils::findResource(const char* type, const TQString& filename)
}
if(rc.isEmpty()) {
- tqWarning("No resource found for (%s,%s)", type, filename.latin1());
+ tqWarning(TQString("No resource found for (%1,%2)").arg(type).arg(filename));
}
return rc;
}
@@ -436,7 +436,7 @@ MyMoneyTransaction KMyMoneyUtils::scheduledTransaction(const MyMoneySchedule& sc
calculateAutoLoan(schedule, t, TQMap<TQString, MyMoneyMoney>());
}
} catch (MyMoneyException* e) {
- tqDebug("Unable to load schedule details for '%s' during transaction match: %s", schedule.name().data(), e->what().data());
+ tqDebug(TQString("Unable to load schedule details for '%1' during transaction match: %1").arg(schedule.name()).arg(e->what()));
delete e;
}
diff --git a/kmymoney2/mymoney/mymoneyaccount.cpp b/kmymoney2/mymoney/mymoneyaccount.cpp
index 3b48602..aaa4372 100644
--- a/kmymoney2/mymoney/mymoneyaccount.cpp
+++ b/kmymoney2/mymoney/mymoneyaccount.cpp
@@ -66,7 +66,7 @@ MyMoneyAccount::MyMoneyAccount(const TQDomElement& node) :
setName(node.attribute("name"));
- // tqDebug("Reading information for account %s", acc.name().data());
+ // tqDebug(TQString("Reading information for account %1").arg(acc.name()));
setParentAccountId(TQStringEmpty(node.attribute("parentaccount")));
setLastModified(stringToDate(TQStringEmpty(node.attribute("lastmodified"))));
@@ -97,7 +97,7 @@ MyMoneyAccount::MyMoneyAccount(const TQDomElement& node) :
if(bOK) {
setAccountType(static_cast<MyMoneyAccount::accountTypeE>(type));
} else {
- tqWarning("XMLREADER: Account %s had invalid or no account type information.", name().data());
+ tqWarning(TQString("XMLREADER: Account %1 had invalid or no account type information.").arg(name()));
}
if(node.hasAttribute("openingbalance")) {
@@ -109,7 +109,7 @@ MyMoneyAccount::MyMoneyAccount(const TQDomElement& node) :
setDescription(node.attribute("description"));
m_id = TQStringEmpty(node.attribute("id"));
- // tqDebug("Account %s has id of %s, type of %d, parent is %s.", acc.name().data(), id.data(), type, acc.parentAccountId().data());
+ // tqDebug(TQString("Account %1 has id of %2, type of %3, parent is %4.").arg(acc.name()).arg(id).arg(type).arg(acc.parentAccountId()));
// Process any Sub-Account information found inside the account entry.
m_accountList.clear();
diff --git a/kmymoney2/mymoney/mymoneyfile.cpp b/kmymoney2/mymoney/mymoneyfile.cpp
index 8091e91..95676cd 100644
--- a/kmymoney2/mymoney/mymoneyfile.cpp
+++ b/kmymoney2/mymoney/mymoneyfile.cpp
@@ -741,7 +741,7 @@ const MyMoneyAccount MyMoneyFile::openingBalanceAccount(const MyMoneySecurity& s
ft.commit();
} catch(MyMoneyException* e) {
- tqDebug("Unable to create opening balance account for security %s", security.id().data());
+ tqDebug(TQString("Unable to create opening balance account for security %1").arg(security.id()));
delete e;
}
return acc;
@@ -1101,10 +1101,10 @@ void MyMoneyFile::warningMissingRate(const TQString& fromId, const TQString& toI
try {
from = security(fromId);
to = security(toId);
- tqWarning("Missing price info for conversion from %s to %s", from.name().latin1(), to.name().latin1());
+ tqWarning(TQString("Missing price info for conversion from %1 to %2").arg(from.name()).arg(to.name()));
} catch(MyMoneyException *e) {
- tqFatal("Missing security caught in MyMoneyFile::warningMissingRate(): %s(%ld) %s", e->file().data(), e->line(), e->what().data());
+ tqFatal(TQString("Missing security caught in MyMoneyFile::warningMissingRate(): %1(%2) %3").arg(e->file()).arg(e->line()).arg(e->what()));
delete e;
}
}
@@ -1812,11 +1812,11 @@ TQString MyMoneyFile::createCategory(const MyMoneyAccount& base, const TQString&
}
catch (MyMoneyException *e)
{
- tqDebug("Unable to add account %s, %s, %s: %s",
- categoryAccount.name().latin1(),
- parent.name().latin1(),
- categoryText.latin1(),
- e->what().latin1());
+ tqDebug(TQString("Unable to add account %1, %2, %3: %4").
+ arg(categoryAccount.name()).
+ arg(parent.name()).
+ arg(categoryText).
+ arg(e->what()));
delete e;
}
diff --git a/kmymoney2/mymoney/mymoneyobjectcontainer.cpp b/kmymoney2/mymoney/mymoneyobjectcontainer.cpp
index 63f4d1c..601bbb5 100644
--- a/kmymoney2/mymoney/mymoneyobjectcontainer.cpp
+++ b/kmymoney2/mymoney/mymoneyobjectcontainer.cpp
@@ -194,7 +194,7 @@ void MyMoneyObjectContainer::refresh(const TQString& id)
const MyMoneySchedule& s = m_storage->schedule(id);
m_map[id] = new MyMoneySchedule(s);
} else {
- tqWarning("Ooops, should preload an unknown object with id '%s'", id.data());
+ tqWarning(TQString("Ooops, should preload an unknown object with id '%1'").arg(id));
}
return;
}
diff --git a/kmymoney2/mymoney/mymoneyscheduled.cpp b/kmymoney2/mymoney/mymoneyscheduled.cpp
index 3891d6b..53e7d77 100644
--- a/kmymoney2/mymoney/mymoneyscheduled.cpp
+++ b/kmymoney2/mymoney/mymoneyscheduled.cpp
@@ -623,7 +623,7 @@ MyMoneyAccount MyMoneySchedule::account(int cnt) const
if(!cnt)
return acc;
} catch(MyMoneyException *e) {
- tqWarning("Schedule '%s' references unknown account '%s'", id().data(), (*it).accountId().data());
+ tqWarning(TQString("Schedule '%1' references unknown account '%2'").arg(id()).arg((*it).accountId()));
delete e;
return MyMoneyAccount();
}
diff --git a/kmymoney2/mymoney/mymoneytransactionfilter.cpp b/kmymoney2/mymoney/mymoneytransactionfilter.cpp
index fa4fd91..76fc4cb 100644
--- a/kmymoney2/mymoney/mymoneytransactionfilter.cpp
+++ b/kmymoney2/mymoney/mymoneytransactionfilter.cpp
@@ -849,13 +849,13 @@ bool MyMoneyTransactionFilter::translateDateRange(dateOptionE id, TQDate& start,
void MyMoneyTransactionFilter::removeReference(const TQString& id)
{
if(m_accounts.find(id)) {
- tqDebug("%s", (TQString("Remove account '%1' from report").arg(id)).data());
+ tqDebug(TQString("Remove account '%1' from report").arg(id));
m_accounts.remove(id);
} else if(m_categories.find(id)) {
- tqDebug("%s", (TQString("Remove category '%1' from report").arg(id)).data());
+ tqDebug(TQString("Remove category '%1' from report").arg(id));
m_categories.remove(id);
} else if(m_payees.find(id)) {
- tqDebug("%s", (TQString("Remove payee '%1' from report").arg(id)).data());
+ tqDebug(TQString("Remove payee '%1' from report").arg(id));
m_payees.remove(id);
}
}
diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
index 4386f63..98b6286 100644
--- a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
+++ b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
@@ -925,7 +925,7 @@ const MyMoneyMoney MyMoneyDatabaseMgr::balance(const TQString& id, const TQDate&
MyMoneyAccount acc;
TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(/*TQString(id)*/);
//TQMap<TQString, MyMoneyAccount>::const_iterator accpos = accountList.find(id);
- if (date_ != TQDate()) tqDebug ("request balance for %s at %s", id.data(), TQString(date_.toString(Qt::ISODate)).latin1());
+ if (date_ != TQDate()) tqDebug (TQString("request balance for %1 at %2").arg(id).arg(date_.toString(Qt::ISODate)));
// if(!date_.isValid() && MyMoneyFile::instance()->account(id).accountType() != MyMoneyAccount::Stock) {
// if(accountList.find(id) != accountList.end())
// return accountList[id].balance();
@@ -1224,7 +1224,7 @@ const TQValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleList(const TQStri
// tqDebug("scheduleList()");
for(pos = scheduleList.begin(); pos != scheduleList.end(); ++pos) {
- // tqDebug(" '%s'", (*pos).id().data());
+ // tqDebug(TQString(" '%1'").arg((*pos).id()));
if(type != MyMoneySchedule::TYPE_ANY) {
if(type != (*pos).type()) {
@@ -1288,7 +1288,7 @@ const TQValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleList(const TQStri
*/
}
- // tqDebug("Adding '%s'", (*pos).name().latin1());
+ // tqDebug(TQString("Adding '%1'").arg((*pos).name()));
list << *pos;
}
return list;
@@ -1334,7 +1334,7 @@ const TQValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleListEx( int sched
continue;
}
-// tqDebug("\tAdding '%s'", (*pos).name().latin1());
+// tqDebug(TQString("\tAdding '%1'").arg((*pos).name());
list << *pos;
}
diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp
index 92db207..869e2e4 100644
--- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp
+++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp
@@ -874,7 +874,7 @@ const MyMoneyMoney MyMoneySeqAccessMgr::balance(const TQString& id, const TQDate
{
MyMoneyMoney result(0);
MyMoneyAccount acc;
- // if (date != TQDate()) tqDebug ("request balance for %s at %s", id.data(), date.toString(Qt::ISODate).latin1());
+ // if (date != TQDate()) tqDebug(TQString("request balance for %1 at %2").arg(id).arg(date.toString(Qt::ISODate)));
if(!date.isValid() && account(id).accountType() != MyMoneyAccount::Stock) {
if(m_accountList.find(id) != m_accountList.end())
return m_accountList[id].balance();
@@ -1252,7 +1252,7 @@ const TQValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleList(
// tqDebug("scheduleList()");
for(pos = m_scheduleList.begin(); pos != m_scheduleList.end(); ++pos) {
- // tqDebug(" '%s'", qPrintable((*pos).id()));
+ // tqDebug(TQString(" '%1'").arg(qPrintable((*pos).id())));
if(type != MyMoneySchedule::TYPE_ANY) {
if(type != (*pos).type()) {
@@ -1309,7 +1309,7 @@ const TQValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleList(
continue;
}
- // tqDebug("Adding '%s'", (*pos).name().latin1());
+ // tqDebug(TQString("Adding '%1'").arg((*pos).name()));
list << *pos;
}
return list;
@@ -1378,7 +1378,7 @@ const TQValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleListEx(int sched
continue;
}
-// tqDebug("\tAdding '%s'", (*pos).name().latin1());
+// tqDebug(TQString("\tAdding '%1'").arg((*pos).name()));
list << *pos;
}
diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
index 5a9dc95..1b8e694 100644
--- a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
+++ b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
@@ -186,7 +186,7 @@ try {
}
break;
default:
- tqFatal("%s", TQString("%1 - unknown open mode %2").arg(__func__).arg(openMode).data());
+ tqFatal(TQString("%1 - unknown open mode %2").arg(__func__).arg(openMode));
}
if (rc != 0) return (rc);
// bypass logon check if we are creating a database
@@ -199,7 +199,7 @@ try {
.arg(m_logonUser)
.arg(m_logonAt.date().toString(Qt::ISODate))
.arg(m_logonAt.time().toString("hh.mm.ss"));
- tqDebug("%s", m_error.data());
+ tqDebug(m_error);
close(false);
rc = -1;
} else {
@@ -209,7 +209,7 @@ try {
}
return(rc);
} catch (TQString& s) {
- tqDebug("%s",s.data());
+ tqDebug(s);
return (1);
}
}
@@ -925,7 +925,7 @@ bool MyMoneyStorageSql::endCommitUnit (const TQString& callingFunction) {
// as value of this method.
bool rc = true;
if (callingFunction != m_commitUnitStack.top())
- tqDebug("%s", TQString("%1 - %2 s/be %3").arg(__func__).arg(callingFunction).arg(m_commitUnitStack.top()).data());
+ tqDebug(TQString("%1 - %2 s/be %3").arg(__func__).arg(callingFunction).arg(m_commitUnitStack.top()));
m_commitUnitStack.pop();
if (m_commitUnitStack.isEmpty()) {
if (!commit()) throw new MYMONEYEXCEPTION(buildError (MyMoneySqlQuery(), __func__, "ending commit unit"));
@@ -936,7 +936,7 @@ bool MyMoneyStorageSql::endCommitUnit (const TQString& callingFunction) {
void MyMoneyStorageSql::cancelCommitUnit (const TQString& callingFunction) {
DBG("*** Entering MyMoneyStorageSql::cancelCommitUnit");
if (callingFunction != m_commitUnitStack.top())
- tqDebug("%s", TQString("%1 - %2 s/be %3").arg(__func__).arg(callingFunction).arg(m_commitUnitStack.top()).data());
+ tqDebug(TQString("%1 - %2 s/be %3").arg(__func__).arg(callingFunction).arg(m_commitUnitStack.top()));
if (m_commitUnitStack.isEmpty()) return;
m_commitUnitStack.clear();
if (!rollback()) throw new MYMONEYEXCEPTION(buildError (MyMoneySqlQuery(), __func__, "cancelling commit unit"));
@@ -2921,7 +2921,7 @@ const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (
int obc = whereClause.contains('(');
int cbc = whereClause.contains(')');
if (cbc > obc) {
- tqFatal("invalid where clause - %s", whereClause.latin1());
+ tqFatal(TQString("invalid where clause - %1").arg(whereClause));
}
while (cbc < obc) {
whereClause.append(")");
@@ -3801,7 +3801,7 @@ TQString& MyMoneyStorageSql::buildError (const TQSqlQuery& q, const TQString& fu
s += TQString ("\nQuery error No %1: %2").arg(e.number()).arg(e.text());
const_cast <MyMoneyStorageSql*> (this)->m_error = s;
- tqDebug("%s", s.ascii());
+ tqDebug(s);
const_cast <MyMoneyStorageSql*> (this)->cancelCommitUnit(function);
return (const_cast <MyMoneyStorageSql*> (this)->m_error);
}
diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp
index 7a69ef3..c1c0324 100644
--- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp
+++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp
@@ -362,7 +362,7 @@ int KOnlineBankingSetupWizard::ofxAccountCallback(struct OfxAccountData data, vo
kvps.setValue("kmmofx-acc-ref", TQString("%1-%2").arg(kvps.value("bankid"), kvps.value("uniqueId")));
} else {
- tqDebug("Cannot setup kmmofx-acc-ref for '%s'", kvps.value("bankname").data());
+ tqDebug(TQString("Cannot setup kmmofx-acc-ref for '%1'").arg(kvps.value("bankname")));
}
kvps.setValue("protocol","OFX");
diff --git a/kmymoney2/reports/objectinfotable.cpp b/kmymoney2/reports/objectinfotable.cpp
index 5f93729..75ed019 100644
--- a/kmymoney2/reports/objectinfotable.cpp
+++ b/kmymoney2/reports/objectinfotable.cpp
@@ -361,7 +361,7 @@ MyMoneyMoney ObjectInfoTable::investmentBalance(const MyMoneyAccount& acc)
val = val.convert(acc.fraction());
value += val;
} catch(MyMoneyException* e) {
- tqWarning("%s", (TQString("cannot convert stock balance of %1 to base currency: %2").arg(stock.name(), e->what())).data());
+ tqWarning(TQString("cannot convert stock balance of %1 to base currency: %2").arg(stock.name(), e->what()));
delete e;
}
}
diff --git a/kmymoney2/reports/pivottable.cpp b/kmymoney2/reports/pivottable.cpp
index a85b44f..6035d20 100644
--- a/kmymoney2/reports/pivottable.cpp
+++ b/kmymoney2/reports/pivottable.cpp
@@ -76,7 +76,7 @@ Debug::Debug( const TQString& _name ): m_methodName( _name ), m_enabled( m_sEnab
if (m_enabled)
{
- tqDebug( "%s%s(): ENTER", m_sTabs.latin1(), m_methodName.latin1() );
+ tqDebug(TQString("%1%2(): ENTER").arg(m_sTabs).arg(m_methodName));
m_sTabs.append("--");
}
}
@@ -86,7 +86,7 @@ Debug::~Debug()
if ( m_enabled )
{
m_sTabs.remove(0,2);
- tqDebug( "%s%s(): EXIT", m_sTabs.latin1(), m_methodName.latin1() );
+ tqDebug(TQString("%1%2(): EXIT").arg(m_sTabs).arg(m_methodName));
if (m_methodName == m_sEnableKey)
m_enabled = false;
@@ -96,7 +96,7 @@ Debug::~Debug()
void Debug::output( const TQString& _text )
{
if ( m_enabled )
- tqDebug( "%s%s(): %s", m_sTabs.latin1(), m_methodName.latin1(), _text.latin1() );
+ tqDebug(TQString("%1%2(): %3").arg(m_sTabs).arg(m_methodName).arg(_text));
}
PivotTable::PivotTable( const MyMoneyReport& _config_f ):
@@ -194,7 +194,7 @@ void PivotTable::init(void)
try {
transactions = file->transactionList(m_config_f);
} catch(MyMoneyException *e) {
- tqDebug("ERR: %s thrown in %s(%ld)", e->what().data(), e->file().data(), e->line());
+ tqDebug(TQString("ERR: %1 thrown in %2(%s)").arg(e->what()).arg(e->file()).arg(e->line()));
throw e;
}
DEBUG_OUTPUT(TQString("Found %1 matching transactions").arg(transactions.count()));
diff --git a/kmymoney2/views/kgloballedgerview.cpp b/kmymoney2/views/kgloballedgerview.cpp
index 8867485..270e630 100644
--- a/kmymoney2/views/kgloballedgerview.cpp
+++ b/kmymoney2/views/kgloballedgerview.cpp
@@ -567,9 +567,9 @@ void TDEGlobalLedgerView::loadView(void)
paymentAmount[it_b.key()] = MyMoneyMoney();
}
- tracer.printf("total balance of %s = %s", m_account.name().data(), actBalance[m_account.id()].formatMoney("", 2).data());
- tracer.printf("future balance of %s = %s", m_account.name().data(), futureBalance[m_account.id()].formatMoney("", 2).data());
- tracer.printf("cleared balance of %s = %s", m_account.name().data(), clearedBalance[m_account.id()].formatMoney("", 2).data());
+ tracer.printf("total balance of %s = %s", m_account.name().local8Bit().data(), actBalance[m_account.id()].formatMoney("", 2).local8Bit().data());
+ tracer.printf("future balance of %s = %s", m_account.name().local8Bit().data(), futureBalance[m_account.id()].formatMoney("", 2).local8Bit().data());
+ tracer.printf("cleared balance of %s = %s", m_account.name().local8Bit().data(), clearedBalance[m_account.id()].formatMoney("", 2).local8Bit().data());
KMyMoneyRegister::RegisterItem* p = m_register->lastItem();
focusItem = 0;
@@ -619,11 +619,11 @@ void TDEGlobalLedgerView::loadView(void)
if(!t->isScheduled()) {
if(split.reconcileFlag() == MyMoneySplit::NotReconciled) {
- tracer.printf("Reducing cleared balance by %s because %s/%s(%s) is not reconciled", (split.shares() * factor).formatMoney("", 2).data(), t->transaction().id().data(), split.id().data(), t->transaction().postDate().toString(Qt::ISODate).data());
+ tracer.printf("Reducing cleared balance by %s because %s/%s(%s) is not reconciled", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), t->transaction().id().local8Bit().data(), split.id().local8Bit().data(), t->transaction().postDate().toString(Qt::ISODate).local8Bit().data());
clearedBalance[split.accountId()] -= split.shares() * factor;
}
if(isReconciliationAccount() && t->transaction().postDate() > reconciliationDate && split.reconcileFlag() == MyMoneySplit::Cleared) {
- tracer.printf("Reducing cleared balance by %s because we are in reconciliation, %s/%s(%s)'s date is after or on reconciliation date (%s) and is cleared", (split.shares() * factor).formatMoney("", 2).data(), t->transaction().id().data(), split.id().data(), t->transaction().postDate().toString(Qt::ISODate).data(), reconciliationDate.toString(Qt::ISODate).data());
+ tracer.printf("Reducing cleared balance by %s because we are in reconciliation, %s/%s(%s)'s date is after or on reconciliation date (%s) and is cleared", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), t->transaction().id().local8Bit().data(), split.id().local8Bit().data(), t->transaction().postDate().toString(Qt::ISODate).local8Bit().data(), reconciliationDate.toString(Qt::ISODate).local8Bit().data());
clearedBalance[split.accountId()] -= split.shares() * factor;
}
@@ -638,7 +638,7 @@ void TDEGlobalLedgerView::loadView(void)
}
if(t->transaction().postDate() > TQDate::currentDate()) {
- tracer.printf("Reducing actual balance by %s because %s/%s(%s) is in the future", (split.shares() * factor).formatMoney("", 2).data(), t->transaction().id().data(), split.id().data(), t->transaction().postDate().toString(Qt::ISODate).data());
+ tracer.printf("Reducing actual balance by %s because %s/%s(%s) is in the future", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), t->transaction().id().local8Bit().data(), split.id().local8Bit().data(), t->transaction().postDate().toString(Qt::ISODate).local8Bit().data());
actBalance[split.accountId()] -= split.shares() * factor;
}
}
@@ -647,9 +647,9 @@ void TDEGlobalLedgerView::loadView(void)
p = p->prevItem();
}
- tracer.printf("total balance of %s = %s", m_account.name().data(), actBalance[m_account.id()].formatMoney("", 2).data());
- tracer.printf("future balance of %s = %s", m_account.name().data(), futureBalance[m_account.id()].formatMoney("", 2).data());
- tracer.printf("cleared balance of %s = %s", m_account.name().data(), clearedBalance[m_account.id()].formatMoney("", 2).data());
+ tracer.printf("total balance of %s = %s", m_account.name().local8Bit().data(), actBalance[m_account.id()].formatMoney("", 2).local8Bit().data());
+ tracer.printf("future balance of %s = %s", m_account.name().local8Bit().data(), futureBalance[m_account.id()].formatMoney("", 2).local8Bit().data());
+ tracer.printf("cleared balance of %s = %s", m_account.name().local8Bit().data(), clearedBalance[m_account.id()].formatMoney("", 2).local8Bit().data());
// update statement information
if(statement) {
@@ -850,7 +850,7 @@ void TDEGlobalLedgerView::loadAccounts(void)
try {
d->m_precision = MyMoneyMoney::denomToPrec(m_account.fraction());
} catch(MyMoneyException *e) {
- tqDebug("Security %s for account %s not found", m_account.currencyId().data(), m_account.name().data());
+ tqDebug(TQString("Security %1 for account %2 not found").arg(m_account.currencyId()).arg(m_account.name()));
delete e;
d->m_precision = 2;
}
@@ -959,7 +959,7 @@ bool TDEGlobalLedgerView::slotSelectAccount(const TQString& id, const TQString&
m_newAccountLoaded = true;
slotLoadView();
} catch(MyMoneyException* e) {
- tqDebug("Unable to retrieve account %s", id.data());
+ tqDebug(TQString("Unable to retrieve account %1").arg(id));
delete e;
rc = false;
}
@@ -1217,10 +1217,10 @@ bool TDEGlobalLedgerView::focusNextPrevChild(bool next)
w = tqApp->focusWidget();
while(w && m_tabOrderWidgets.find(w) == -1) {
- // tqDebug("'%s' not in list, use parent", w->className());
+ // tqDebug(TQString("'%1' not in list, use parent").arg(w->className()));
w = w->parentWidget();
}
- // if(w) tqDebug("tab order is at '%s'", w->className());
+ // if(w) tqDebug(TQString("tab order is at '%1'").arg(w->className()));
currentWidget = m_tabOrderWidgets.current();
w = next ? m_tabOrderWidgets.next() : m_tabOrderWidgets.prev();
@@ -1232,7 +1232,7 @@ bool TDEGlobalLedgerView::focusNextPrevChild(bool next)
if(w != currentWidget
&& ((w->focusPolicy() & TQ_TabFocus) == TQ_TabFocus)
&& w->isVisible() && w->isEnabled()) {
- // tqDebug("Selecting '%s' as focus", w->className());
+ // tqDebug(TQString("Selecting '%1' as focus").arg(w->className()));
w->setFocus();
rc = true;
break;
@@ -1273,14 +1273,14 @@ bool TDEGlobalLedgerView::eventFilter(TQObject* o, TQEvent* e)
if(e->type() == TQEvent::KeyPress) {
TQKeyEvent *k = TQT_TQKEYEVENT(e);
if(m_inEditMode) {
- // tqDebug("object = %s, key = %d", o->className(), k->key());
+ // tqDebug(TQString("object = %1, key = %2").arg(o->className()).arg(k->key()));
if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_register)) {
// we hide all key press events from the register
// while editing a transaction
rc = true;
}
} else {
- // tqDebug("object = %s, key = %d", o->className(), k->key());
+ // tqDebug(TQString("object = %1, key = %2").arg(o->className()).arg(k->key()));
if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_register)) {
if((k->state() & TQt::KeyButtonMask) == 0) {
switch(k->key()) {
@@ -1336,7 +1336,7 @@ void TDEGlobalLedgerView::slotSortOptions(void)
MyMoneyFile::instance()->modifyAccount(m_account);
ft.commit();
} catch(MyMoneyException* e) {
- tqDebug("Unable to update sort order for account '%s': %s", m_account.name().latin1(), e->what().latin1());
+ tqDebug(TQString("Unable to update sort order for account '%1': %2").arg(m_account.name()).arg(e->what()));
delete e;
}
}
diff --git a/kmymoney2/views/khomeview.cpp b/kmymoney2/views/khomeview.cpp
index 11cc2a9..86157f4 100644
--- a/kmymoney2/views/khomeview.cpp
+++ b/kmymoney2/views/khomeview.cpp
@@ -191,8 +191,8 @@ void KHomeView::loadView(void)
{
tqDebug("Element id=test found!");
TQString tagname = e.tagName().string();
- tqDebug("%s",tagname.latin1());
- tqDebug("%s id=%s",e.tagName().string().latin1(),e.getAttribute("id").string().latin1());
+ tqDebug(tagname);
+ tqDebug(TQString("%1 id=%2").arg(e.tagName().string()).arg(e.getAttribute("id").string()));
// Find the character data node
DOM::Node n = e.firstChild();
@@ -208,7 +208,7 @@ void KHomeView::loadView(void)
m_part->document().importNode(e,true);
m_part->document().updateRendering();
- tqDebug("Data is now %s",t.data().string().latin1());
+ tqDebug(TQString("Data is now %1").arg(t.data().string()));
}
n = n.nextSibling();
}
@@ -686,12 +686,12 @@ void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt)
tmp += showColoredAmount(balance, balanceAfter.isNegative());
tmp += "</td>";
- // tqDebug("paymentEntry = '%s'", tmp.latin1());
+ // tqDebug(TQString("paymentEntry = '%1'").arg(tmp));
m_part->write(tmp);
}
}
} catch(MyMoneyException* e) {
- tqDebug("Unable to display schedule entry: %s", e->what().data());
+ tqDebug(TQString("Unable to display schedule entry: %1").arg(e->what()));
delete e;
}
}
@@ -872,7 +872,7 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc, const MyMoneyMoney&
tmp += TQString("<td class=\"right\">%1</td>").arg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative()));
}
}
- // tqDebug("accountEntry = '%s'", tmp.latin1());
+ // tqDebug(TQString("accountEntry = '%1'").arg(tmp));
m_part->write(tmp);
}
@@ -897,7 +897,7 @@ MyMoneyMoney KHomeView::investmentBalance(const MyMoneyAccount& acc)
val = val.convert(acc.fraction());
value += val;
} catch(MyMoneyException* e) {
- tqWarning("%s", (TQString("cannot convert stock balance of %1 to base currency: %2").arg(stock.name(), e->what())).data());
+ tqWarning(TQString("cannot convert stock balance of %1 to base currency: %2").arg(stock.name(), e->what()));
delete e;
}
}
@@ -1188,7 +1188,7 @@ void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */)
loadView();
} else {
- tqDebug("Unknown view '%s' in KHomeView::slotOpenURL()", view.latin1());
+ tqDebug(TQString("Unknown view '%1' in KHomeView::slotOpenURL()").arg(view));
}
}
}
diff --git a/kmymoney2/views/kinvestmentview.cpp b/kmymoney2/views/kinvestmentview.cpp
index dbaf41a..5919775 100644
--- a/kmymoney2/views/kinvestmentview.cpp
+++ b/kmymoney2/views/kinvestmentview.cpp
@@ -185,7 +185,7 @@ void KInvestmentView::loadAccounts(void)
try {
d->m_precision = MyMoneyMoney::denomToPrec(d->m_account.fraction());
} catch(MyMoneyException *e) {
- tqDebug("Security %s for account %s not found", d->m_account.currencyId().data(), d->m_account.name().data());
+ tqDebug(TQString("Security %1 for account %2 not found").arg(d->m_account.currencyId()).arg(d->m_account.name()));
delete e;
d->m_precision = 2;
}
@@ -234,7 +234,7 @@ bool KInvestmentView::slotSelectAccount(const TQString& id, const TQString& tran
}
} catch(MyMoneyException* e) {
- tqDebug("Unable to retrieve account %s", id.data());
+ tqDebug(TQString("Unable to retrieve account %1").arg(id));
delete e;
rc = false;
}
diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp
index 0862009..696e09f 100644
--- a/kmymoney2/views/kmymoneyview.cpp
+++ b/kmymoney2/views/kmymoneyview.cpp
@@ -559,7 +559,7 @@ bool KMyMoneyView::readFile(const KURL& url)
#else
if(url.isMalformed()) {
#endif
- tqDebug("Invalid URL '%s'", url.url().latin1());
+ tqDebug(TQString("Invalid URL '%1'").arg(url.url()));
return false;
}
@@ -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()) {
- tqDebug("%s", (TQString("testing fileFixVersion %1 < %2").arg(s->fileFixVersion()).arg(s->currentFixVersion())).data());
+ tqDebug(TQString("testing fileFixVersion %1 < %2").arg(s->fileFixVersion()).arg(s->currentFixVersion()));
switch (s->fileFixVersion()) {
case 0:
fixFile_0();
@@ -1308,7 +1308,7 @@ void KMyMoneyView::selectBaseCurrency(void)
file->modifyAccount(*it);
ft.commit();
} catch(MyMoneyException *e) {
- tqDebug("Unable to setup base currency in account %s (%s): %s", (*it).name().latin1(), (*it).id().data(), e->what().latin1());
+ tqDebug(TQString("Unable to setup base currency in account %1 (%2): %3").arg((*it).name()).arg((*it).id()).arg(e->what()));
delete e;
}
}
@@ -1336,7 +1336,7 @@ void KMyMoneyView::loadDefaultCurrency(const MyMoneySecurity& currency, const bo
}
ft.commit();
} catch (MyMoneyException* e) {
- tqDebug("Error %s loading default currency", e->what().data());
+ tqDebug(TQString("Error %1 loading default currency").arg(e->what()));
delete e;
}
}
@@ -1536,7 +1536,7 @@ void KMyMoneyView::loadAncientCurrency(const TQString& id, const TQString& name,
}
ft.commit();
} catch(MyMoneyException *e) {
- tqDebug("Error loading currency: %s", e->what().data());
+ tqDebug(TQString("Error loading currency: %1").arg(e->what()));
delete e;
}
}
@@ -1866,7 +1866,7 @@ void KMyMoneyView::fixSchedule_0(MyMoneySchedule sched)
MyMoneyFile::instance()->modifySchedule(sched);
}
} catch(MyMoneyException *e) {
- tqWarning("Unable to update broken schedule: %s", e->what().latin1());
+ tqWarning(TQString("Unable to update broken schedule: %1").arg(e->what()));
delete e;
}
}
@@ -2082,7 +2082,7 @@ void KMyMoneyView::fixTransactions_0(void)
file->modifyTransaction(*it_t);
}
splits = (*it_t).splits(); // update local copy
- tqDebug("Fixed credit card assignment in %s", (*it_t).id().data());
+ tqDebug(TQString("Fixed credit card assignment in %1").arg((*it_t).id()));
}
#endif
@@ -2104,7 +2104,7 @@ void KMyMoneyView::fixTransactions_0(void)
(*it_s).setAction(MyMoneySplit::ActionInterest);
(*it_t).modifySplit(*it_s);
file->modifyTransaction(*it_t);
- tqDebug("Fixed interest action in %s", (*it_t).id().data());
+ tqDebug(TQString("Fixed interest action in %1").arg((*it_t).id()));
}
// if it does not reference an interest account, it must not be
// of type ActionInterest
@@ -2114,7 +2114,7 @@ void KMyMoneyView::fixTransactions_0(void)
(*it_s).setAction(defaultAction);
(*it_t).modifySplit(*it_s);
file->modifyTransaction(*it_t);
- tqDebug("Fixed interest action in %s", (*it_t).id().data());
+ tqDebug(TQString("Fixed interest action in %1").arg((*it_t).id()));
}
}
@@ -2134,14 +2134,14 @@ void KMyMoneyView::fixTransactions_0(void)
try {
int fract = splitAccount.fraction();
if((*it_s).shares() != (*it_s).shares().convert(fract)) {
- tqDebug("adjusting fraction in %s,%s", (*it_t).id().data(), (*it_s).id().data());
+ tqDebug(TQString("adjusting fraction in %1,%2").arg((*it_t).id()).arg((*it_s).id()));
(*it_s).setShares((*it_s).shares().convert(fract));
(*it_s).setValue((*it_s).value().convert(fract));
(*it_t).modifySplit(*it_s);
file->modifyTransaction(*it_t);
}
} catch(MyMoneyException* e) {
- tqDebug("Missing security '%s', split not altered", splitAccount.currencyId().data());
+ tqDebug(TQString("Missing security '%1', split not altered").arg(splitAccount.currencyId()));
delete e;
}
}
@@ -2164,7 +2164,7 @@ void KMyMoneyView::fixTransactions_0(void)
void KMyMoneyView::fixDuplicateAccounts_0(MyMoneyTransaction& t)
{
- tqDebug("Duplicate account in transaction %s", t.id().data());
+ tqDebug(TQString("Duplicate account in transaction %1").arg(t.id()));
}
void KMyMoneyView::slotPrintView(void)
diff --git a/kmymoney2/views/kscheduledview.cpp b/kmymoney2/views/kscheduledview.cpp
index fc7f748..defcf96 100644
--- a/kmymoney2/views/kscheduledview.cpp
+++ b/kmymoney2/views/kscheduledview.cpp
@@ -488,7 +488,7 @@ void KScheduledView::slotSetSelectedItem(TQListViewItem* item)
emit scheduleSelected(schedule);
m_selectedSchedule = schedItem->scheduleId();
} catch(MyMoneyException* e) {
- tqDebug("KScheduledView::slotSetSelectedItem: %s", e->what().data());
+ tqDebug(TQString("KScheduledView::slotSetSelectedItem: %1").arg(e->what()));
delete e;
}
}
diff --git a/kmymoney2/widgets/kaccounttemplateselector.cpp b/kmymoney2/widgets/kaccounttemplateselector.cpp
index 257494e..710cb62 100644
--- a/kmymoney2/widgets/kaccounttemplateselector.cpp
+++ b/kmymoney2/widgets/kaccounttemplateselector.cpp
@@ -188,7 +188,7 @@ void KAccountTemplateSelector::slotLoadTemplateList(void)
TQStringList::iterator it;
for(it = d->dirlist.begin(); it != d->dirlist.end(); ++it) {
TQDir dir(*it);
- // tqDebug("Reading dir '%s' with %d entries", (*it).data(), dir.count());
+ // tqDebug(TQSttring("Reading dir '%1' with %2 entries").arg(*it).arg(dir.count()));
dirs = dir.entryList("*", TQDir::Dirs);
TQStringList::iterator it_d;
for(it_d= dirs.begin(); it_d != dirs.end(); ++it_d) {
@@ -218,7 +218,7 @@ void KAccountTemplateSelector::slotLoadTemplateList(void)
TQString country = TDEGlobal::locale()->twoAlphaToCountryName((*it_d).upper());
d->countries[country] = *it_d;
} else {
- tqDebug("'%s/%s' not scanned", (*it).data(), (*it_d).data());
+ tqDebug(TQString("'%1/%2' not scanned").arg(*it).arg(*it_d));
}
}
}
diff --git a/kmymoney2/widgets/kmymoneyaccountcombo.cpp b/kmymoney2/widgets/kmymoneyaccountcombo.cpp
index 37dbc76..dc7c283 100644
--- a/kmymoney2/widgets/kmymoneyaccountcombo.cpp
+++ b/kmymoney2/widgets/kmymoneyaccountcombo.cpp
@@ -90,7 +90,7 @@ void KMyMoneyAccountCombo::setSelected(const TQString& id)
MyMoneyAccount acc = MyMoneyFile::instance()->account(id);
setSelected(acc);
} catch(MyMoneyException *e) {
- tqDebug("Account '%s' not found in %s(%d)", id.data(), __FILE__, __LINE__);
+ tqDebug(TQString("Account '%1' not found in %2(%3)").arg(id).arg(__FILE__).arg(__LINE__));
delete e;
}
} else {
diff --git a/kmymoney2/widgets/register.cpp b/kmymoney2/widgets/register.cpp
index afdf61a..5952227 100644
--- a/kmymoney2/widgets/register.cpp
+++ b/kmymoney2/widgets/register.cpp
@@ -637,7 +637,7 @@ void Register::dropEvent(TQDropEvent* event)
tqDebug("Drop was ok");
KURL::List urls;
KURLDrag::decode(event, urls);
- tqDebug("List is '%s'", urls.toStringList().join(";").data());
+ tqDebug(TQString("List is '%s'").arg(urls.toStringList().join(";")));
event->accept();
}
}
@@ -671,7 +671,7 @@ void Register::slotAutoColumnSizing(int section)
}
size += TQString("%1").arg((columnWidth(i) * 100) / w);
}
- tqDebug("size = %s", size.data());
+ tqDebug(TQString("size = %1").arg(size));
m_account.setValue("kmm-ledger-column-width", size);
}
#endif
diff --git a/libkgpgfile/kgpgfile.cpp b/libkgpgfile/kgpgfile.cpp
index 034bf90..ca75e29 100644
--- a/libkgpgfile/kgpgfile.cpp
+++ b/libkgpgfile/kgpgfile.cpp
@@ -571,7 +571,7 @@ void KGPGFile::publicKeyList(TQStringList& list, const TQString& pattern)
val = TQString("%1:%2").arg(currentKey).arg(fields[9]);
map[val] = val;
} else {
- tqDebug("'%s' is expired", fields[9].data());
+ tqDebug(TQString("'%1' is expired").arg(fields[9]));
}
} else if(fields[0] == "uid") {
val = TQString("%1:%2").arg(currentKey).arg(fields[9]);