summaryrefslogtreecommitdiffstats
path: root/kmymoney2/views
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/views')
-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
5 files changed, 40 insertions, 40 deletions
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;
}
}