summaryrefslogtreecommitdiffstats
path: root/kmymoney2/dialogs/transactionmatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/dialogs/transactionmatcher.cpp')
-rw-r--r--kmymoney2/dialogs/transactionmatcher.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kmymoney2/dialogs/transactionmatcher.cpp b/kmymoney2/dialogs/transactionmatcher.cpp
index 5b8d4b5..2ed5356 100644
--- a/kmymoney2/dialogs/transactionmatcher.cpp
+++ b/kmymoney2/dialogs/transactionmatcher.cpp
@@ -80,38 +80,38 @@ void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTr
// verify that the amounts are the same, otherwise we should not be matching!
if(sm.shares() != si.shares()) {
- throw new MYMONEYEXCEPTION(i18n("Splits for %1 have conflicting values (%2,%3)").arg(m_account.name()).arg(sm.shares().formatMoney(m_account, sec), si.shares().formatMoney(m_account, sec)));
+ throw new MYMONEYEXCEPTION(i18n("Splits for %1 have conflicting values (%2,%3)").tqarg(m_account.name()).tqarg(sm.shares().formatMoney(m_account, sec), si.shares().formatMoney(m_account, sec)));
}
// ipwizard: I took over the code to keep the bank id found in the endMatchTransaction
- // This might not work for QIF imports as they don't setup this information. It sure
+ // This might not work for TQIF imports as they don't setup this information. It sure
// makes sense for OFX and HBCI.
- const QString& bankID = si.bankID();
+ const TQString& bankID = si.bankID();
if (!bankID.isEmpty()) {
try {
if (sm.bankID().isEmpty() ) {
sm.setBankID( bankID );
tm.modifySplit(sm);
} else if(sm.bankID() != bankID) {
- throw new MYMONEYEXCEPTION(i18n("Both of these transactions have been imported into %1. Therefore they cannot be matched. Matching works with one imported transaction and one non-imported transaction.").arg(m_account.name()));
+ throw new MYMONEYEXCEPTION(i18n("Both of these transactions have been imported into %1. Therefore they cannot be matched. Matching works with one imported transaction and one non-imported transaction.").tqarg(m_account.name()));
}
} catch(MyMoneyException *e) {
- QString estr = e->what();
+ TQString estr = e->what();
delete e;
- throw new MYMONEYEXCEPTION(i18n("Unable to match all splits (%1)").arg(estr));
+ throw new MYMONEYEXCEPTION(i18n("Unable to match all splits (%1)").tqarg(estr));
}
}
#if 0 // Ace's original code
// TODO (Ace) Add in another error to catch the case where a user
// tries to match two hand-entered transactions.
- QValueList<MyMoneySplit> endSplits = endMatchTransaction.splits();
- QValueList<MyMoneySplit>::const_iterator it_split = endSplits.begin();
+ TQValueList<MyMoneySplit> endSplits = endMatchTransaction.splits();
+ TQValueList<MyMoneySplit>::const_iterator it_split = endSplits.begin();
while (it_split != endSplits.end())
{
// find the corresponding split in the start transaction
MyMoneySplit startSplit;
- QString accountid = (*it_split).accountId();
+ TQString accountid = (*it_split).accountId();
try
{
startSplit = startMatchTransaction.splitByAccount( accountid );
@@ -129,11 +129,11 @@ void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTr
// matching!
if ( (*it_split).value() != startSplit.value() )
{
- QString accountname = MyMoneyFile::instance()->account(accountid).name();
- throw new MYMONEYEXCEPTION(i18n("Splits for %1 have conflicting values (%2,%3)").arg(accountname).arg((*it_split).value().formatMoney(),startSplit.value().formatMoney()));
+ TQString accountname = MyMoneyFile::instance()->account(accountid).name();
+ throw new MYMONEYEXCEPTION(i18n("Splits for %1 have conflicting values (%2,%3)").tqarg(accountname).tqarg((*it_split).value().formatMoney(),startSplit.value().formatMoney()));
}
- QString bankID = (*it_split).bankID();
+ TQString bankID = (*it_split).bankID();
if ( ! bankID.isEmpty() )
{
try
@@ -145,15 +145,15 @@ void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTr
}
else
{
- QString accountname = MyMoneyFile::instance()->account(accountid).name();
- throw new MYMONEYEXCEPTION(i18n("Both of these transactions have been imported into %1. Therefore they cannot be matched. Matching works with one imported transaction and one non-imported transaction.").arg(accountname));
+ TQString accountname = MyMoneyFile::instance()->account(accountid).name();
+ throw new MYMONEYEXCEPTION(i18n("Both of these transactions have been imported into %1. Therefore they cannot be matched. Matching works with one imported transaction and one non-imported transaction.").tqarg(accountname));
}
}
catch(MyMoneyException *e)
{
- QString estr = e->what();
+ TQString estr = e->what();
delete e;
- throw new MYMONEYEXCEPTION(i18n("Unable to match all splits (%1)").arg(estr));
+ throw new MYMONEYEXCEPTION(i18n("Unable to match all splits (%1)").tqarg(estr));
}
}
++it_split;
@@ -179,7 +179,7 @@ void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTr
}
// combine the two memos into one
- QString memo = sm.memo();
+ TQString memo = sm.memo();
if(!si.memo().isEmpty() && si.memo() != memo) {
sm.setValue("kmm-orig-memo", memo);
if(!memo.isEmpty())
@@ -217,7 +217,7 @@ void TransactionMatcher::unmatch(const MyMoneyTransaction& _t, const MyMoneySpli
// restore the postdate if modified
if(!sm.value("kmm-orig-postdate").isEmpty()) {
- tm.setPostDate(QDate::fromString(sm.value("kmm-orig-postdate"), Qt::ISODate));
+ tm.setPostDate(TQDate::fromString(sm.value("kmm-orig-postdate"), Qt::ISODate));
}
// restore payee if modified
@@ -257,13 +257,13 @@ void TransactionMatcher::accept(const MyMoneyTransaction& _t, const MyMoneySplit
}
}
-void TransactionMatcher::checkTransaction(const MyMoneyTransaction& tm, const MyMoneyTransaction& ti, const MyMoneySplit& si, QPair<MyMoneyTransaction, MyMoneySplit>& lastMatch, TransactionMatcher::autoMatchResultE& result, int variation) const
+void TransactionMatcher::checkTransaction(const MyMoneyTransaction& tm, const MyMoneyTransaction& ti, const MyMoneySplit& si, TQPair<MyMoneyTransaction, MyMoneySplit>& lastMatch, TransactionMatcher::autoMatchResultE& result, int variation) const
{
Q_UNUSED(ti);
- const QValueList<MyMoneySplit>& splits = tm.splits();
- QValueList<MyMoneySplit>::const_iterator it_s;
+ const TQValueList<MyMoneySplit>& splits = tm.splits();
+ TQValueList<MyMoneySplit>::const_iterator it_s;
for(it_s = splits.begin(); it_s != splits.end(); ++it_s) {
MyMoneyMoney upper((*it_s).shares());
MyMoneyMoney lower(upper);
@@ -277,7 +277,7 @@ void TransactionMatcher::checkTransaction(const MyMoneyTransaction& tm, const My
// check for duplicate (we can only do that, if we have a bankID)
if(!si.bankID().isEmpty()) {
if((*it_s).bankID() == si.bankID()) {
- lastMatch = QPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s);
+ lastMatch = TQPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s);
result = matchedDuplicate;
break;
}
@@ -292,10 +292,10 @@ void TransactionMatcher::checkTransaction(const MyMoneyTransaction& tm, const My
&& (si.shares() >= lower) && (si.shares() <= upper)
&& !(*it_s).isMatched()) {
if(tm.postDate() == ti.postDate()) {
- lastMatch = QPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s);
+ lastMatch = TQPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s);
result = matchedExact;
} else if(result != matchedExact) {
- lastMatch = QPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s);
+ lastMatch = TQPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s);
result = matched;
}
}
@@ -313,12 +313,12 @@ MyMoneyObject const * TransactionMatcher::findMatch(const MyMoneyTransaction& ti
filter.setDateFilter(ti.postDate().addDays(-m_days), ti.postDate().addDays(m_days));
filter.setAmountFilter(si.shares(), si.shares());
- QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > list;
+ TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> > list;
MyMoneyFile::instance()->transactionList(list, filter);
// parse list
- QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::iterator it_l;
- QPair<MyMoneyTransaction, MyMoneySplit> lastMatch;
+ TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::iterator it_l;
+ TQPair<MyMoneyTransaction, MyMoneySplit> lastMatch;
for(it_l = list.begin(); (result != matchedDuplicate) && (it_l != list.end()); ++it_l) {
// just skip myself
@@ -336,13 +336,13 @@ MyMoneyObject const * TransactionMatcher::findMatch(const MyMoneyTransaction& ti
} else {
// if we did not find anything, we need to scan for scheduled transactions
- QValueList<MyMoneySchedule> list;
- QValueList<MyMoneySchedule>::iterator it_sch;
+ TQValueList<MyMoneySchedule> list;
+ TQValueList<MyMoneySchedule>::iterator it_sch;
// find all schedules that have a reference to the current account
list = MyMoneyFile::instance()->scheduleList(m_account.id());
for(it_sch = list.begin(); (result != matched && result != matchedExact) && (it_sch != list.end()); ++it_sch) {
// get the next due date adjusted by the weekend switch
- QDate nextDueDate = (*it_sch).nextDueDate();
+ TQDate nextDueDate = (*it_sch).nextDueDate();
if((*it_sch).isOverdue() ||
(nextDueDate >= ti.postDate().addDays(-m_days)
&& nextDueDate <= ti.postDate().addDays(m_days))) {