summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney
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/mymoney
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/mymoney')
-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
8 files changed, 31 insertions, 31 deletions
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);
}