From fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 5 Jul 2011 06:00:29 +0000 Subject: TQt4 port kmymoney This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmymoney2/reports/objectinfotable.cpp | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'kmymoney2/reports/objectinfotable.cpp') diff --git a/kmymoney2/reports/objectinfotable.cpp b/kmymoney2/reports/objectinfotable.cpp index 649f6c2..37dfecc 100644 --- a/kmymoney2/reports/objectinfotable.cpp +++ b/kmymoney2/reports/objectinfotable.cpp @@ -19,9 +19,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include -#include -#include +#include +#include +#include // ---------------------------------------------------------------------------- // KDE Includes @@ -105,7 +105,7 @@ void ObjectInfoTable::init ( void ) throw new MYMONEYEXCEPTION ( "ObjectInfoTable::ObjectInfoTable(): unhandled row type" ); } - QString sort = m_group + "," + m_columns + ",id,rank"; + TQString sort = m_group + "," + m_columns + ",id,rank"; switch ( m_config.rowType() ) { case MyMoneyReport::eSchedule: @@ -133,11 +133,11 @@ void ObjectInfoTable::constructScheduleTable ( void ) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList schedules; + TQValueList schedules; schedules = file->scheduleList ( "", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, m_config.fromDate(), m_config.toDate() ); - QValueList::const_iterator it_schedule = schedules.begin(); + TQValueList::const_iterator it_schedule = schedules.begin(); while ( it_schedule != schedules.end() ) { MyMoneySchedule schedule = *it_schedule; @@ -157,7 +157,7 @@ void ObjectInfoTable::constructScheduleTable ( void ) //convert to base currency if needed MyMoneyMoney xr = MyMoneyMoney(1,1); if (m_config.isConvertCurrency() && account.isForeignCurrency()) { - xr = account.baseCurrencyPrice(QDate::currentDate()).reduce(); + xr = account.baseCurrencyPrice(TQDate::tqcurrentDate()).reduce(); } // help for sort and render functions @@ -187,8 +187,8 @@ void ObjectInfoTable::constructScheduleTable ( void ) if ( m_config.detailLevel() == MyMoneyReport::eDetailAll ) { //get the information for all splits - QValueList splits = transaction.splits(); - QValueList::const_iterator split_it = splits.begin(); + TQValueList splits = transaction.splits(); + TQValueList::const_iterator split_it = splits.begin(); for ( ;split_it != splits.end(); split_it++ ) { TableRow splitRow; @@ -235,9 +235,9 @@ void ObjectInfoTable::constructAccountTable ( void ) //make sure we have all subaccounts of investment accounts includeInvestmentSubAccounts(); - QValueList accounts; + TQValueList accounts; file->accountList(accounts); - QValueList::const_iterator it_account = accounts.begin(); + TQValueList::const_iterator it_account = accounts.begin(); while ( it_account != accounts.end() ) { TableRow accountRow; @@ -274,7 +274,7 @@ void ObjectInfoTable::constructAccountTable ( void ) //convert to base currency if needed if (m_config.isConvertCurrency() && account.isForeignCurrency()) { - MyMoneyMoney xr = account.baseCurrencyPrice(QDate::currentDate()).reduce(); + MyMoneyMoney xr = account.baseCurrencyPrice(TQDate::tqcurrentDate()).reduce(); value = value * xr; } accountRow["currentbalance"] = value.toString(); @@ -289,9 +289,9 @@ void ObjectInfoTable::constructAccountLoanTable ( void ) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList accounts; + TQValueList accounts; file->accountList(accounts); - QValueList::const_iterator it_account = accounts.begin(); + TQValueList::const_iterator it_account = accounts.begin(); while ( it_account != accounts.end() ) { TableRow accountRow; @@ -306,7 +306,7 @@ void ObjectInfoTable::constructAccountLoanTable ( void ) //convert to base currency if needed MyMoneyMoney xr = MyMoneyMoney(1,1); if (m_config.isConvertCurrency() && account.isForeignCurrency()) { - xr = account.baseCurrencyPrice(QDate::currentDate()).reduce(); + xr = account.baseCurrencyPrice(TQDate::tqcurrentDate()).reduce(); } accountRow["rank"] = "0"; @@ -321,7 +321,7 @@ void ObjectInfoTable::constructAccountLoanTable ( void ) accountRow["currencyname"] = (file->currency(account.currencyId())).name(); accountRow["payee"] = file->payee(loan.payee()).name(); accountRow["loanamount"] = (loan.loanAmount() * xr).toString(); - accountRow["interestrate"] = (loan.interestRate(QDate::currentDate())/MyMoneyMoney(100,1)*xr).toString(); + accountRow["interestrate"] = (loan.interestRate(TQDate::tqcurrentDate())/MyMoneyMoney(100,1)*xr).toString(); accountRow["nextinterestchange"] = loan.nextInterestChange().toString( Qt::ISODate ); accountRow["periodicpayment"] = (loan.periodicPayment() * xr).toString(); accountRow["finalpayment"] = (loan.finalPayment() * xr).toString(); @@ -342,7 +342,7 @@ MyMoneyMoney ObjectInfoTable::investmentBalance(const MyMoneyAccount& acc) MyMoneyMoney value; value = file->balance(acc.id()); - QValueList::const_iterator it_a; + TQValueList::const_iterator it_a; for(it_a = acc.accountList().begin(); it_a != acc.accountList().end(); ++it_a) { MyMoneyAccount stock = file->account(*it_a); try { @@ -357,7 +357,7 @@ MyMoneyMoney ObjectInfoTable::investmentBalance(const MyMoneyAccount& acc) val = val.convert(acc.fraction()); value += val; } catch(MyMoneyException* e) { - qWarning("%s", (QString("cannot convert stock balance of %1 to base currency: %2").arg(stock.name(), e->what())).data()); + qWarning("%s", (TQString("cannot convert stock balance of %1 to base currency: %2").tqarg(stock.name(), e->what())).data()); delete e; } } -- cgit v1.2.3