summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-03-17 09:54:21 +0100
committerSlávek Banko <slavek.banko@axis.cz>2022-03-18 12:45:32 +0100
commiteeae53f59df4d79d0399c2217a165ff2fab754db (patch)
tree768c8b3c67ed80698dcb4e66285ad673e9d3fb0f /kmymoney2/converter
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 <slavek.banko@axis.cz>
Diffstat (limited to 'kmymoney2/converter')
-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
4 files changed, 77 insertions, 76 deletions
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);