summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-11-05 11:54:03 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-11-05 22:44:03 +0900
commit0008104748e6613c41d60b0545c07ed34e16ddec (patch)
tree12b1131ace7823c35c51d7f03002ed0e9f476dbd /kmymoney2/mymoney
parenta84f7caff6a73b3d554279d41b9a00aa15ad1400 (diff)
downloadkmymoney-0008104748e6613c41d60b0545c07ed34e16ddec.tar.gz
kmymoney-0008104748e6613c41d60b0545c07ed34e16ddec.zip
Replace Qt with TQt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 96c67c9b3924ab034d3d34aa03d3ea7cf0746587)
Diffstat (limited to 'kmymoney2/mymoney')
-rw-r--r--kmymoney2/mymoney/mymoneyaccount.cpp6
-rw-r--r--kmymoney2/mymoney/mymoneyaccounttest.cpp6
-rw-r--r--kmymoney2/mymoney/mymoneybudget.cpp8
-rw-r--r--kmymoney2/mymoney/mymoneyprice.cpp2
-rw-r--r--kmymoney2/mymoney/mymoneyreport.cpp8
-rw-r--r--kmymoney2/mymoney/mymoneyscheduletest.cpp48
-rw-r--r--kmymoney2/mymoney/mymoneystatement.cpp16
-rw-r--r--kmymoney2/mymoney/mymoneyutils.cpp4
-rw-r--r--kmymoney2/mymoney/mymoneyutils.h6
-rw-r--r--kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp2
-rw-r--r--kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp2
-rw-r--r--kmymoney2/mymoney/storage/mymoneystoragedump.cpp26
-rw-r--r--kmymoney2/mymoney/storage/mymoneystoragesql.cpp54
-rw-r--r--kmymoney2/mymoney/storage/mymoneystoragesql.h4
-rw-r--r--kmymoney2/mymoney/storage/mymoneystoragexml.cpp2
15 files changed, 97 insertions, 97 deletions
diff --git a/kmymoney2/mymoney/mymoneyaccount.cpp b/kmymoney2/mymoney/mymoneyaccount.cpp
index c35c257..d8139d3 100644
--- a/kmymoney2/mymoney/mymoneyaccount.cpp
+++ b/kmymoney2/mymoney/mymoneyaccount.cpp
@@ -82,7 +82,7 @@ MyMoneyAccount::MyMoneyAccount(const TQDomElement& node) :
// to be ok for now. (ipwizard - 2008-08-14)
TQString txt = MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement()).value("lastStatementDate");
if(!txt.isEmpty()) {
- setLastReconciliationDate(TQDate::fromString(txt, Qt::ISODate));
+ setLastReconciliationDate(TQDate::fromString(txt, TQt::ISODate));
}
}
@@ -168,7 +168,7 @@ void MyMoneyAccount::setLastReconciliationDate(const TQDate& date)
// keep the last reconciliation date also in the KVP for backward
// compatability. After that, the setValue() statemetn should be removed
// and the XML ctor should remove the value completely from the KVP
- setValue("lastStatementDate", date.toString(Qt::ISODate));
+ setValue("lastStatementDate", date.toString(TQt::ISODate));
m_lastReconciliationDate = date;
}
@@ -360,7 +360,7 @@ const TQDate MyMoneyAccountLoan::nextInterestChange(void) const
void MyMoneyAccountLoan::setNextInterestChange(const TQDate& date)
{
- setValue("interest-nextchange", date.toString(Qt::ISODate));
+ setValue("interest-nextchange", date.toString(TQt::ISODate));
}
int MyMoneyAccountLoan::interestChangeFrequency(int* unit) const
diff --git a/kmymoney2/mymoney/mymoneyaccounttest.cpp b/kmymoney2/mymoney/mymoneyaccounttest.cpp
index 0c2e292..9755d3c 100644
--- a/kmymoney2/mymoney/mymoneyaccounttest.cpp
+++ b/kmymoney2/mymoney/mymoneyaccounttest.cpp
@@ -313,7 +313,7 @@ void MyMoneyAccountTest::testWriteXML() {
" </KEYVALUEPAIRS>\n"
" </ACCOUNT>\n"
"</ACCOUNT-CONTAINER>\n").
- arg(TQDate::currentDate().toString(Qt::ISODate)).arg(TQDate::currentDate().toString(Qt::ISODate));
+ arg(TQDate::currentDate().toString(TQt::ISODate)).arg(TQDate::currentDate().toString(TQt::ISODate));
CPPUNIT_ASSERT(doc.toString() == ref);
}
@@ -334,7 +334,7 @@ void MyMoneyAccountTest::testReadXML() {
" </KEYVALUEPAIRS>\n"
" </ACCOUNT>\n"
"</ACCOUNT-CONTAINER>\n").
- arg(TQDate::currentDate().toString(Qt::ISODate)).arg(TQDate::currentDate().toString(Qt::ISODate));
+ arg(TQDate::currentDate().toString(TQt::ISODate)).arg(TQDate::currentDate().toString(TQt::ISODate));
TQString ref_false = TQString(
"<!DOCTYPE TEST>\n"
@@ -350,7 +350,7 @@ void MyMoneyAccountTest::testReadXML() {
" </KEYVALUEPAIRS>\n"
" </KACCOUNT>\n"
"</ACCOUNT-CONTAINER>\n").
- arg(TQDate::currentDate().toString(Qt::ISODate)).arg(TQDate::currentDate().toString(Qt::ISODate));
+ arg(TQDate::currentDate().toString(TQt::ISODate)).arg(TQDate::currentDate().toString(TQt::ISODate));
TQDomDocument doc;
TQDomElement node;
diff --git a/kmymoney2/mymoney/mymoneybudget.cpp b/kmymoney2/mymoney/mymoneybudget.cpp
index c0c4054..24cc85f 100644
--- a/kmymoney2/mymoney/mymoneybudget.cpp
+++ b/kmymoney2/mymoney/mymoneybudget.cpp
@@ -198,7 +198,7 @@ void MyMoneyBudget::write(TQDomElement& e, TQDomDocument *doc) const
writeBaseXML(*doc, e);
e.setAttribute("name", m_name);
- e.setAttribute("start", m_start.toString(Qt::ISODate) );
+ e.setAttribute("start", m_start.toString(TQt::ISODate) );
e.setAttribute("version", BUDGET_VERSION);
TQMap<TQString, AccountGroup>::const_iterator it;
@@ -217,7 +217,7 @@ void MyMoneyBudget::write(TQDomElement& e, TQDomDocument *doc) const
TQDomElement domPeriod = doc->createElement("PERIOD");
domPeriod.setAttribute("amount", (*it_per).amount().toString());
- domPeriod.setAttribute("start", (*it_per).startDate().toString(Qt::ISODate));
+ domPeriod.setAttribute("start", (*it_per).startDate().toString(TQt::ISODate));
domAccount.appendChild(domPeriod);
}
}
@@ -240,7 +240,7 @@ bool MyMoneyBudget::read(const TQDomElement& e)
{
result = true;
m_name = e.attribute("name");
- m_start = TQDate::fromString(e.attribute("start"), Qt::ISODate);
+ m_start = TQDate::fromString(e.attribute("start"), TQt::ISODate);
m_id = e.attribute("id");
TQDomNode child = e.firstChild();
@@ -273,7 +273,7 @@ bool MyMoneyBudget::read(const TQDomElement& e)
if("PERIOD" == per.tagName() && per.hasAttribute("amount") && per.hasAttribute("start"))
{
pGroup.setAmount( MyMoneyMoney(per.attribute("amount")) );
- pGroup.setStartDate( TQDate::fromString(per.attribute("start"), Qt::ISODate) );
+ pGroup.setStartDate( TQDate::fromString(per.attribute("start"), TQt::ISODate) );
account.addPeriod(pGroup.startDate(), pGroup);
}
diff --git a/kmymoney2/mymoney/mymoneyprice.cpp b/kmymoney2/mymoney/mymoneyprice.cpp
index b51e810..eadf11a 100644
--- a/kmymoney2/mymoney/mymoneyprice.cpp
+++ b/kmymoney2/mymoney/mymoneyprice.cpp
@@ -53,7 +53,7 @@ MyMoneyPrice::MyMoneyPrice(const TQString& from, const TQString& to, const TQDom
m_fromSecurity = from;
m_toSecurity = to;
- m_date = TQDate::fromString(node.attribute("date"), Qt::ISODate);
+ m_date = TQDate::fromString(node.attribute("date"), TQt::ISODate);
m_rate = MyMoneyMoney(node.attribute("price"));
m_source = node.attribute("source");
diff --git a/kmymoney2/mymoney/mymoneyreport.cpp b/kmymoney2/mymoney/mymoneyreport.cpp
index adb6e9e..9761275 100644
--- a/kmymoney2/mymoney/mymoneyreport.cpp
+++ b/kmymoney2/mymoney/mymoneyreport.cpp
@@ -551,9 +551,9 @@ void MyMoneyReport::write ( TQDomElement& e, TQDomDocument *doc, bool anonymous
{
TQDomElement f = doc->createElement ( "DATES" );
if ( dateFrom.isValid() )
- f.setAttribute ( "from", dateFrom.toString ( Qt::ISODate ) );
+ f.setAttribute ( "from", dateFrom.toString ( TQt::ISODate ) );
if ( dateTo.isValid() )
- f.setAttribute ( "to", dateTo.toString ( Qt::ISODate ) );
+ f.setAttribute ( "to", dateTo.toString ( TQt::ISODate ) );
e.appendChild ( f );
}
}
@@ -736,9 +736,9 @@ bool MyMoneyReport::read ( const TQDomElement& e )
{
TQDate from, to;
if ( c.hasAttribute ( "from" ) )
- from = TQDate::fromString ( c.attribute ( "from" ), Qt::ISODate );
+ from = TQDate::fromString ( c.attribute ( "from" ), TQt::ISODate );
if ( c.hasAttribute ( "to" ) )
- to = TQDate::fromString ( c.attribute ( "to" ), Qt::ISODate );
+ to = TQDate::fromString ( c.attribute ( "to" ), TQt::ISODate );
MyMoneyTransactionFilter::setDateFilter ( from, to );
}
if ( "PAYEE" == c.tagName() )
diff --git a/kmymoney2/mymoney/mymoneyscheduletest.cpp b/kmymoney2/mymoney/mymoneyscheduletest.cpp
index d7a3b07..77da043 100644
--- a/kmymoney2/mymoney/mymoneyscheduletest.cpp
+++ b/kmymoney2/mymoney/mymoneyscheduletest.cpp
@@ -263,13 +263,13 @@ void MyMoneyScheduleTest::testOverdue()
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n");
- TQString ref_overdue = ref.arg(startDate.toString(Qt::ISODate))
- .arg(lastPaymentDate.toString(Qt::ISODate))
- .arg(lastPaymentDate.toString(Qt::ISODate));
+ TQString ref_overdue = ref.arg(startDate.toString(TQt::ISODate))
+ .arg(lastPaymentDate.toString(TQt::ISODate))
+ .arg(lastPaymentDate.toString(TQt::ISODate));
- TQString ref_intime = ref.arg(startDate.addDays(1).toString(Qt::ISODate))
- .arg(lastPaymentDate.addDays(1).toString(Qt::ISODate))
- .arg(lastPaymentDate.addDays(1).toString(Qt::ISODate));
+ TQString ref_intime = ref.arg(startDate.addDays(1).toString(TQt::ISODate))
+ .arg(lastPaymentDate.addDays(1).toString(TQt::ISODate))
+ .arg(lastPaymentDate.addDays(1).toString(TQt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1075,9 +1075,9 @@ void MyMoneyScheduleTest::testWriteXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).arg(TQDate::currentDate().toString(Qt::ISODate))
- .arg(TQDate::currentDate().toString(Qt::ISODate))
- .arg(TQDate::currentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(TQt::ISODate))
+ .arg(TQDate::currentDate().toString(TQt::ISODate))
+ .arg(TQDate::currentDate().toString(TQt::ISODate));
CPPUNIT_ASSERT(doc.toString() == ref);
}
@@ -1103,9 +1103,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).arg(TQDate::currentDate().toString(Qt::ISODate))
- .arg(TQDate::currentDate().toString(Qt::ISODate))
- .arg(TQDate::currentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(TQt::ISODate))
+ .arg(TQDate::currentDate().toString(TQt::ISODate))
+ .arg(TQDate::currentDate().toString(TQt::ISODate));
// diff to ref_ok1 is that we now have an empty entrydate
// in the transaction parameters
@@ -1127,9 +1127,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).arg(TQDate::currentDate().toString(Qt::ISODate))
- .arg(TQDate::currentDate().toString(Qt::ISODate))
- .arg(TQDate::currentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(TQt::ISODate))
+ .arg(TQDate::currentDate().toString(TQt::ISODate))
+ .arg(TQDate::currentDate().toString(TQt::ISODate));
TQString ref_false = TQString(
"<!DOCTYPE TEST>\n"
@@ -1149,9 +1149,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).arg(TQDate::currentDate().toString(Qt::ISODate))
- .arg(TQDate::currentDate().toString(Qt::ISODate))
- .arg(TQDate::currentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(TQt::ISODate))
+ .arg(TQDate::currentDate().toString(TQt::ISODate))
+ .arg(TQDate::currentDate().toString(TQt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1241,9 +1241,9 @@ void MyMoneyScheduleTest::testHasReferenceTo()
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).arg(TQDate::currentDate().toString(Qt::ISODate))
- .arg(TQDate::currentDate().toString(Qt::ISODate))
- .arg(TQDate::currentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(TQt::ISODate))
+ .arg(TQDate::currentDate().toString(TQt::ISODate))
+ .arg(TQDate::currentDate().toString(TQt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1892,9 +1892,9 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime()
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).arg(paymentInFuture.toString(Qt::ISODate))
- .arg(paymentInFuture.toString(Qt::ISODate))
- .arg(paymentInFuture.toString(Qt::ISODate));
+ ).arg(paymentInFuture.toString(TQt::ISODate))
+ .arg(paymentInFuture.toString(TQt::ISODate))
+ .arg(paymentInFuture.toString(TQt::ISODate));
TQDomDocument doc;
TQDomElement node;
diff --git a/kmymoney2/mymoney/mymoneystatement.cpp b/kmymoney2/mymoney/mymoneystatement.cpp
index 639bcd8..e3d155b 100644
--- a/kmymoney2/mymoney/mymoneystatement.cpp
+++ b/kmymoney2/mymoney/mymoneystatement.cpp
@@ -51,8 +51,8 @@ void MyMoneyStatement::write(TQDomElement& _root,TQDomDocument* _doc) const
e.setAttribute("accountnumber", m_strAccountNumber);
e.setAttribute("routingnumber", m_strRoutingNumber);
e.setAttribute("currency", m_strCurrency);
- e.setAttribute("begindate", m_dateBegin.toString(Qt::ISODate));
- e.setAttribute("enddate", m_dateEnd.toString(Qt::ISODate));
+ e.setAttribute("begindate", m_dateBegin.toString(TQt::ISODate));
+ e.setAttribute("enddate", m_dateEnd.toString(TQt::ISODate));
e.setAttribute("closingbalance", m_closingBalance.toString());
e.setAttribute("type", kAccountTypeTxt[m_eType]);
e.setAttribute("accountid", m_accountId);
@@ -63,7 +63,7 @@ void MyMoneyStatement::write(TQDomElement& _root,TQDomDocument* _doc) const
while ( it_t != m_listTransactions.end() )
{
TQDomElement p = _doc->createElement("TRANSACTION");
- p.setAttribute("dateposted", (*it_t).m_datePosted.toString(Qt::ISODate));
+ p.setAttribute("dateposted", (*it_t).m_datePosted.toString(TQt::ISODate));
p.setAttribute("payee", (*it_t).m_strPayee);
p.setAttribute("memo", (*it_t).m_strMemo);
p.setAttribute("number", (*it_t).m_strNumber);
@@ -102,7 +102,7 @@ void MyMoneyStatement::write(TQDomElement& _root,TQDomDocument* _doc) const
while ( it_p != m_listPrices.end() )
{
TQDomElement p = _doc->createElement("PRICE");
- p.setAttribute("dateposted", (*it_p).m_date.toString(Qt::ISODate));
+ p.setAttribute("dateposted", (*it_p).m_date.toString(TQt::ISODate));
p.setAttribute("security", (*it_p).m_strSecurity);
p.setAttribute("amount", (*it_p).m_amount.toString());
@@ -139,8 +139,8 @@ bool MyMoneyStatement::read(const TQDomElement& _e)
m_strAccountNumber = _e.attribute("accountnumber");
m_strRoutingNumber = _e.attribute("routingnumber");
m_strCurrency = _e.attribute("currency");
- m_dateBegin = TQDate::fromString(_e.attribute("begindate"),Qt::ISODate);
- m_dateEnd = TQDate::fromString(_e.attribute("enddate"),Qt::ISODate);
+ m_dateBegin = TQDate::fromString(_e.attribute("begindate"),TQt::ISODate);
+ m_dateEnd = TQDate::fromString(_e.attribute("enddate"),TQt::ISODate);
m_closingBalance = MyMoneyMoney(_e.attribute("closingbalance"));
m_accountId = _e.attribute("accountid");
m_skipCategoryMatching = !(_e.attribute("skipCategoryMatching").isEmpty());
@@ -158,7 +158,7 @@ bool MyMoneyStatement::read(const TQDomElement& _e)
{
MyMoneyStatement::Transaction t;
- t.m_datePosted = TQDate::fromString(c.attribute("dateposted"),Qt::ISODate);
+ t.m_datePosted = TQDate::fromString(c.attribute("dateposted"),TQt::ISODate);
t.m_amount = MyMoneyMoney(c.attribute("amount"));
t.m_strMemo = c.attribute("memo");
t.m_strNumber = c.attribute("number");
@@ -197,7 +197,7 @@ bool MyMoneyStatement::read(const TQDomElement& _e)
{
MyMoneyStatement::Price p;
- p.m_date = TQDate::fromString(c.attribute("dateposted"), Qt::ISODate);
+ p.m_date = TQDate::fromString(c.attribute("dateposted"), TQt::ISODate);
p.m_strSecurity = c.attribute("security");
p.m_amount = MyMoneyMoney(c.attribute("amount"));
diff --git a/kmymoney2/mymoney/mymoneyutils.cpp b/kmymoney2/mymoney/mymoneyutils.cpp
index 93700af..5d6a75d 100644
--- a/kmymoney2/mymoney/mymoneyutils.cpp
+++ b/kmymoney2/mymoney/mymoneyutils.cpp
@@ -307,7 +307,7 @@ void MyMoneyTracer::off(void)
TQString dateToString(const TQDate& date)
{
if(!date.isNull() && date.isValid())
- return date.toString(Qt::ISODate);
+ return date.toString(TQt::ISODate);
return TQString::null;
}
@@ -315,7 +315,7 @@ TQString dateToString(const TQDate& date)
TQDate stringToDate(const TQString& str)
{
if(str.length()) {
- TQDate date = TQDate::fromString(str, Qt::ISODate);
+ TQDate date = TQDate::fromString(str, TQt::ISODate);
if(!date.isNull() && date.isValid())
return date;
}
diff --git a/kmymoney2/mymoney/mymoneyutils.h b/kmymoney2/mymoney/mymoneyutils.h
index e2e2ea1..94b7ccc 100644
--- a/kmymoney2/mymoney/mymoneyutils.h
+++ b/kmymoney2/mymoney/mymoneyutils.h
@@ -162,7 +162,7 @@ KMYMONEY_EXPORT void _CheckMemory_End();
#endif // _CHECK_MEMORY
/**
- * This function returns a date in the form specified by Qt::ISODate.
+ * This function returns a date in the form specified by TQt::ISODate.
* If the @p date is invalid an empty string will be returned.
*
* @param date const reference to date to be converted
@@ -172,11 +172,11 @@ KMYMONEY_EXPORT TQString dateToString(const TQDate& date);
/**
* This function returns a date as TQDate object as specified by
- * the parameter @p str. @p str must be in Qt::ISODate format.
+ * the parameter @p str. @p str must be in TQt::ISODate format.
* If @p str is empty or contains an invalid date, TQDate() is
* returned.
*
- * @param str date in Qt::ISODate format
+ * @param str date in TQt::ISODate format
* @return TQDate object
*/
KMYMONEY_EXPORT TQDate stringToDate(const TQString& str);
diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
index ced8e9a..48dfe4c 100644
--- a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
+++ b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
@@ -931,7 +931,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 (TQString("request balance for %1 at %2").arg(id).arg(date_.toString(Qt::ISODate)));
+ if (date_ != TQDate()) tqDebug (TQString("request balance for %1 at %2").arg(id).arg(date_.toString(TQt::ISODate)));
// if(!date_.isValid() && MyMoneyFile::instance()->account(id).accountType() != MyMoneyAccount::Stock) {
// if(accountList.find(id) != accountList.end())
// return accountList[id].balance();
diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp
index f1420dc..5cf448c 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(TQString("request balance for %1 at %2").arg(id).arg(date.toString(Qt::ISODate)));
+ // if (date != TQDate()) tqDebug(TQString("request balance for %1 at %2").arg(id).arg(date.toString(TQt::ISODate)));
if(!date.isValid() && account(id).accountType() != MyMoneyAccount::Stock) {
if(m_accountList.find(id) != m_accountList.end())
return m_accountList[id].balance();
diff --git a/kmymoney2/mymoney/storage/mymoneystoragedump.cpp b/kmymoney2/mymoney/storage/mymoneystoragedump.cpp
index f9c6b43..269d740 100644
--- a/kmymoney2/mymoney/storage/mymoneystoragedump.cpp
+++ b/kmymoney2/mymoney/storage/mymoneystoragedump.cpp
@@ -69,8 +69,8 @@ void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _stora
s << "user zip = " << user.postcode() << "\n";
s << "user telephone = " << user.telephone() << "\n";
s << "user e-mail = " << user.email() << "\n";
- s << "creation date = " << storage->creationDate().toString(Qt::ISODate) << "\n";
- s << "last modification date = " << storage->lastModificationDate().toString(Qt::ISODate) << "\n";
+ s << "creation date = " << storage->creationDate().toString(TQt::ISODate) << "\n";
+ s << "last modification date = " << storage->lastModificationDate().toString(TQt::ISODate) << "\n";
s << "base currency = " << storage->value("kmm-baseCurrency") << "\n";
s << "\n";
@@ -182,9 +182,9 @@ void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _stora
}
s << "\n";
- s << " Opening data = " << (*it_a).openingDate().toString(Qt::ISODate) << "\n";
- s << " Last modified = " << (*it_a).lastModified().toString(Qt::ISODate) << "\n";
- s << " Last reconciled = " << (*it_a).lastReconciliationDate().toString(Qt::ISODate) << "\n";
+ s << " Opening data = " << (*it_a).openingDate().toString(TQt::ISODate) << "\n";
+ s << " Last modified = " << (*it_a).lastModified().toString(TQt::ISODate) << "\n";
+ s << " Last reconciled = " << (*it_a).lastReconciliationDate().toString(TQt::ISODate) << "\n";
s << " Balance = " << (*it_a).balance().formatMoney("", 2) << "\n";
dumpKVP(" KVP: ", s, *it_a);
@@ -294,9 +294,9 @@ void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _stora
for(it_s = list_s.begin(); it_s != list_s.end(); ++it_s) {
s << " ID = " << (*it_s).id() << "\n";
s << " Name = " << (*it_s).name() << "\n";
- s << " Startdate = " << (*it_s).startDate().toString(Qt::ISODate) << "\n";
+ s << " Startdate = " << (*it_s).startDate().toString(TQt::ISODate) << "\n";
if((*it_s).willEnd())
- s << " Enddate = " << (*it_s).endDate().toString(Qt::ISODate) << "\n";
+ s << " Enddate = " << (*it_s).endDate().toString(TQt::ISODate) << "\n";
else
s << " Enddate = not specified\n";
s << " Occurence = " << (*it_s).occurenceToString() << "\n";
@@ -307,13 +307,13 @@ void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _stora
s << " AutoEnter = " << (*it_s).autoEnter() << "\n";
if((*it_s).lastPayment().isValid())
- s << " Last payment = " << (*it_s).lastPayment().toString(Qt::ISODate) << "\n";
+ s << " Last payment = " << (*it_s).lastPayment().toString(TQt::ISODate) << "\n";
else
s << " Last payment = not defined" << "\n";
if((*it_s).isFinished())
s << " Next payment = payment finished" << "\n";
else {
- s << " Next payment = " << (*it_s).nextDueDate().toString(Qt::ISODate) << "\n";
+ s << " Next payment = " << (*it_s).nextDueDate().toString(TQt::ISODate) << "\n";
if((*it_s).isOverdue())
s << " = overdue!" << "\n";
}
@@ -325,7 +325,7 @@ void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _stora
if(list_d.count() > 0) {
s << " Recorded payments" << "\n";
for(it_d = list_d.begin(); it_d != list_d.end(); ++it_d) {
- s << " " << (*it_d).toString(Qt::ISODate) << "\n";
+ s << " " << (*it_d).toString(TQt::ISODate) << "\n";
}
}
s << " TRANSACTION\n";
@@ -358,8 +358,8 @@ void MyMoneyStorageDump::dumpKVP(const TQString& headline, TQTextStream& s, cons
void MyMoneyStorageDump::dumpTransaction(TQTextStream& s, IMyMoneyStorage* storage, const MyMoneyTransaction& it_t)
{
s << " ID = " << it_t.id() << "\n";
- s << " Postdate = " << it_t.postDate().toString(Qt::ISODate) << "\n";
- s << " EntryDate = " << it_t.entryDate().toString(Qt::ISODate) << "\n";
+ s << " Postdate = " << it_t.postDate().toString(TQt::ISODate) << "\n";
+ s << " EntryDate = " << it_t.entryDate().toString(TQt::ISODate) << "\n";
s << " Commodity = [" << it_t.commodity() << "]\n";
s << " Memo = " << it_t.memo() << "\n";
s << " BankID = " << it_t.bankID() << "\n";
@@ -398,7 +398,7 @@ void MyMoneyStorageDump::dumpTransaction(TQTextStream& s, IMyMoneyStorage* stora
s << " Nr = '" << (*it_s).number() << "'\n";
s << " ReconcileFlag = '" << reconcileToString((*it_s).reconcileFlag()) << "'\n";
if((*it_s).reconcileFlag() != MyMoneySplit::NotReconciled) {
- s << " ReconcileDate = " << (*it_s).reconcileDate().toString(Qt::ISODate) << "\n";
+ s << " ReconcileDate = " << (*it_s).reconcileDate().toString(TQt::ISODate) << "\n";
}
s << " BankID = " << (*it_s).bankID() << "\n";
dumpKVP("KVP:", s, (*it_s), 4);
diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
index 952db4f..90a748f 100644
--- a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
+++ b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
@@ -203,7 +203,7 @@ try {
m_error = TQString
(i18n("Database apparently in use\nOpened by %1 on %2 at %3.\nOpen anyway?"))
.arg(m_logonUser)
- .arg(m_logonAt.date().toString(Qt::ISODate))
+ .arg(m_logonAt.date().toString(TQt::ISODate))
.arg(m_logonAt.time().toString("hh.mm.ss"));
tqDebug(m_error);
close(false);
@@ -441,7 +441,7 @@ int MyMoneyStorageSql::upgradeToV1() {
TQMap<TQString, TQDateTime>::ConstIterator it;
for (it = tids.begin(); it != tids.end(); ++it) {
q.prepare ("UPDATE kmmSplits SET postDate=:postDate WHERE transactionId = :id;");
- q.bindValue(":postDate", it.data().toString(Qt::ISODate));
+ q.bindValue(":postDate", it.data().toString(TQt::ISODate));
q.bindValue(":id", it.key());
if (!q.exec()) {
buildError (q, __func__, "priming kmmSplits.postDate");
@@ -1305,13 +1305,13 @@ void MyMoneyStorageSql::writeAccount(const MyMoneyAccount& acc, MyMoneySqlQuery&
if (acc.lastReconciliationDate() == TQDate())
q.bindValue(":lastReconciled", acc.lastReconciliationDate());
else
- q.bindValue(":lastReconciled", TQString(acc.lastReconciliationDate().toString(Qt::ISODate)));
+ q.bindValue(":lastReconciled", TQString(acc.lastReconciliationDate().toString(TQt::ISODate)));
q.bindValue(":lastModified", acc.lastModified());
if (acc.openingDate() == TQDate())
q.bindValue(":openingDate", acc.openingDate());
else
- q.bindValue(":openingDate", TQString(acc.openingDate().toString(Qt::ISODate)));
+ q.bindValue(":openingDate", TQString(acc.openingDate().toString(TQt::ISODate)));
q.bindValue(":accountNumber", acc.number());
q.bindValue(":accountType", acc.accountType());
@@ -1483,9 +1483,9 @@ void MyMoneyStorageSql::writeTransaction(const TQString& txId, const MyMoneyTran
DBG("*** Entering MyMoneyStorageSql::writeTransaction");
q.bindValue(":id", txId);
q.bindValue(":txType", type);
- q.bindValue(":postDate", TQString(tx.postDate().toString(Qt::ISODate)));
+ q.bindValue(":postDate", TQString(tx.postDate().toString(TQt::ISODate)));
q.bindValue(":memo", tx.memo());
- q.bindValue(":entryDate", TQString(tx.entryDate().toString(Qt::ISODate)));
+ q.bindValue(":entryDate", TQString(tx.entryDate().toString(TQt::ISODate)));
q.bindValue(":currencyId", tx.commodity());
q.bindValue(":bankId", tx.bankID());
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Transaction")));
@@ -1547,7 +1547,7 @@ void MyMoneyStorageSql::writeSplit(const TQString& txId, const MyMoneySplit& spl
if (split.reconcileDate() == TQDate())
q.bindValue(":reconcileDate", split.reconcileDate());
else
- q.bindValue(":reconcileDate", TQString(split.reconcileDate().toString(Qt::ISODate)));
+ q.bindValue(":reconcileDate", TQString(split.reconcileDate().toString(TQt::ISODate)));
q.bindValue(":action", split.action());
q.bindValue(":reconcileFlag", split.reconcileFlag());
q.bindValue(":value", split.value().toString());
@@ -1574,7 +1574,7 @@ void MyMoneyStorageSql::writeSplit(const TQString& txId, const MyMoneySplit& spl
q.bindValue(":memo", split.memo());
q.bindValue(":accountId", split.accountId());
q.bindValue(":checkNumber", split.number());
- q.bindValue(":postDate", m_txPostDate.toString(Qt::ISODate)); // FIXME: when Tom puts date into split object
+ q.bindValue(":postDate", m_txPostDate.toString(TQt::ISODate)); // FIXME: when Tom puts date into split object
q.bindValue(":bankId", split.bankID());
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Split")));
deleteKeyValuePairs("SPLIT", txId + TQString::number(splitId));
@@ -1675,8 +1675,8 @@ void MyMoneyStorageSql::writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuer
q.bindValue(":occurenceString", sch.occurenceToString());
q.bindValue(":paymentType", sch.paymentType());
q.bindValue(":paymentTypeString", MyMoneySchedule::paymentMethodToString(sch.paymentType()));
- q.bindValue(":startDate", TQString(sch.startDate().toString(Qt::ISODate)));
- q.bindValue(":endDate", TQString(sch.endDate().toString(Qt::ISODate)));
+ q.bindValue(":startDate", TQString(sch.startDate().toString(TQt::ISODate)));
+ q.bindValue(":endDate", TQString(sch.endDate().toString(TQt::ISODate)));
if (sch.isFixed()) {
q.bindValue(":fixed", "Y");
} else {
@@ -1688,7 +1688,7 @@ void MyMoneyStorageSql::writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuer
q.bindValue(":autoEnter", "N");
}
q.bindValue(":lastPayment", sch.lastPayment());
- q.bindValue(":nextPaymentDue", TQString(sch.nextDueDate().toString(Qt::ISODate)));
+ q.bindValue(":nextPaymentDue", TQString(sch.nextDueDate().toString(TQt::ISODate)));
q.bindValue(":weekendOption", sch.weekendOption());
q.bindValue(":weekendOptionString", MyMoneySchedule::weekendOptionToString(sch.weekendOption()));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Schedules")));
@@ -1704,7 +1704,7 @@ void MyMoneyStorageSql::writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuer
TQValueList<TQDate>::ConstIterator it;
for (it=payments.begin(); it!=payments.end(); ++it) {
q.bindValue(":schedId", sch.id());
- q.bindValue(":payDate", TQString((*it).toString(Qt::ISODate)));
+ q.bindValue(":payDate", TQString((*it).toString(TQt::ISODate)));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Schedule Payment History")));
}
@@ -1856,7 +1856,7 @@ void MyMoneyStorageSql::addPrice(const MyMoneyPrice& p) {
q.prepare (s);
q.bindValue(":fromId", p.from());
q.bindValue(":toId", p.to());
- q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate)));
+ q.bindValue(":priceDate", TQString(p.date().toString(TQt::ISODate)));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("finding Price")));
if (q.next()) {
q.prepare(m_db.m_tables["kmmPrices"].updateString());
@@ -1867,7 +1867,7 @@ void MyMoneyStorageSql::addPrice(const MyMoneyPrice& p) {
}
q.bindValue(":fromId", p.from());
q.bindValue(":toId", p.to());
- q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate)));
+ q.bindValue(":priceDate", TQString(p.date().toString(TQt::ISODate)));
q.bindValue(":price", p.rate(TQString()).toString());
q.bindValue(":priceFormatted",
p.rate(TQString()).formatMoney("", KMyMoneySettings::pricePrecision()));
@@ -1885,7 +1885,7 @@ void MyMoneyStorageSql::removePrice(const MyMoneyPrice& p) {
q.prepare (m_db.m_tables["kmmPrices"].deleteString());
q.bindValue(":fromId", p.from());
q.bindValue(":toId", p.to());
- q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate)));
+ q.bindValue(":priceDate", TQString(p.date().toString(TQt::ISODate)));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Price")));
--m_prices;
writeFileInfo();
@@ -1898,7 +1898,7 @@ void MyMoneyStorageSql::writePrice(const MyMoneyPrice& p) {
q.prepare (m_db.m_tables["kmmPrices"].insertString());
q.bindValue(":fromId", p.from());
q.bindValue(":toId", p.to());
- q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate)));
+ q.bindValue(":priceDate", TQString(p.date().toString(TQt::ISODate)));
q.bindValue(":price", p.rate(TQString()).toString());
q.bindValue(":priceFormatted", p.rate(TQString()).formatMoney("", 2));
q.bindValue(":priceSource", p.source());
@@ -2175,9 +2175,9 @@ void MyMoneyStorageSql::writeFileInfo() {
q.prepare(qs);
q.bindValue(":version", m_dbVersion);
q.bindValue(":fixLevel", m_storage->fileFixVersion());
- q.bindValue(":created", TQString(m_storage->creationDate().toString(Qt::ISODate)));
- //q.bindValue(":lastModified", m_storage->lastModificationDate().toString(Qt::ISODate));
- q.bindValue(":lastModified", TQString(TQDate::currentDate().toString(Qt::ISODate)));
+ q.bindValue(":created", TQString(m_storage->creationDate().toString(TQt::ISODate)));
+ //q.bindValue(":lastModified", m_storage->lastModificationDate().toString(TQt::ISODate));
+ q.bindValue(":lastModified", TQString(TQDate::currentDate().toString(TQt::ISODate)));
q.bindValue(":baseCurrency", m_storage->pairs()["kmm-baseCurrency"]);
q.bindValue(":institutions", (unsigned long long) m_institutions);
q.bindValue(":accounts", (unsigned long long) m_accounts);
@@ -2218,7 +2218,7 @@ void MyMoneyStorageSql::writeFileInfo() {
q.bindValue(":encryptData", m_encryptData);
q.bindValue(":updateInProgress", "N");
q.bindValue(":logonUser", m_logonUser);
- q.bindValue(":logonAt", m_logonAt.toString(Qt::ISODate));
+ q.bindValue(":logonAt", m_logonAt.toString(TQt::ISODate));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing FileInfo")));
}
@@ -2633,7 +2633,7 @@ const TQMap<TQString, MyMoneyMoney> MyMoneyStorageSql::fetchBalance(const TQStri
// the <= operator misbehave when the date matches. To avoid this, add a day to the
// requested date and use the < operator.
if (date.isValid() && !date.isNull())
- queryString += TQString(" AND postDate < '%1'").arg(date.addDays(1).toString(Qt::ISODate));
+ queryString += TQString(" AND postDate < '%1'").arg(date.addDays(1).toString(TQt::ISODate));
DBG (queryString);
q.prepare(queryString);
@@ -2951,11 +2951,11 @@ const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (
TQString dateClause;
TQString connector = "";
if (end != TQDate()) {
- dateClause = TQString("(postDate < '%1')").arg(end.addDays(1).toString(Qt::ISODate));
+ dateClause = TQString("(postDate < '%1')").arg(end.addDays(1).toString(TQt::ISODate));
connector = " and ";
}
if (start != TQDate()) {
- dateClause += TQString("%1 (postDate >= '%2')").arg(connector).arg(start.toString(Qt::ISODate));
+ dateClause += TQString("%1 (postDate >= '%2')").arg(connector).arg(start.toString(TQt::ISODate));
}
// now get a list of transaction ids
// if we have only a date filter, we need to build the list from the tx table
@@ -3259,10 +3259,10 @@ const MyMoneyPrice MyMoneyStorageSql::fetchSinglePrice (const TQString& fromIdL
q.bindValue(":fromId", fromIdList);
q.bindValue(":toId", toIdList);
- q.bindValue(":priceDate", TQString(date.addDays(1).toString(Qt::ISODate)));
+ q.bindValue(":priceDate", TQString(date.addDays(1).toString(TQt::ISODate)));
if (exactDate)
- q.bindValue(":exactDate", TQString(date.toString(Qt::ISODate)));
+ q.bindValue(":exactDate", TQString(date.toString(TQt::ISODate)));
if (! q.exec()) {}
@@ -4141,9 +4141,9 @@ const TQString MyMoneyDbDef::generateSQL (const TQString& driver) const {
replace = TQString::number
(MyMoneyFile::instance()->storage()->currentFixVersion());
if ((*fit)->name() == "created")
- replace = TQDate::currentDate().toString(Qt::ISODate);
+ replace = TQDate::currentDate().toString(TQt::ISODate);
if ((*fit)->name() == "lastModified")
- replace = TQDate::currentDate().toString(Qt::ISODate);
+ replace = TQDate::currentDate().toString(TQt::ISODate);
if ((*fit)->name() == "updateInProgress")
replace = enclose("N");
qs.replace(toReplace, replace);
diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.h b/kmymoney2/mymoney/storage/mymoneystoragesql.h
index ba4f279..10fcab2 100644
--- a/kmymoney2/mymoney/storage/mymoneystoragesql.h
+++ b/kmymoney2/mymoney/storage/mymoneystoragesql.h
@@ -661,11 +661,11 @@ private:
int splitState(const MyMoneyTransactionFilter::stateOptionE& state) const;
inline const TQDate getDate (const TQString& date) const {
- return (date.isNull() ? TQDate() : TQDate::fromString(date, Qt::ISODate));
+ return (date.isNull() ? TQDate() : TQDate::fromString(date, TQt::ISODate));
}
inline const TQDateTime getDateTime (const TQString& date) const {
- return (date.isNull() ? TQDateTime() : TQDateTime::fromString(date, Qt::ISODate));
+ return (date.isNull() ? TQDateTime() : TQDateTime::fromString(date, TQt::ISODate));
}
// open routines
diff --git a/kmymoney2/mymoney/storage/mymoneystoragexml.cpp b/kmymoney2/mymoney/storage/mymoneystoragexml.cpp
index 3ec9cfd..d7f0b6d 100644
--- a/kmymoney2/mymoney/storage/mymoneystoragexml.cpp
+++ b/kmymoney2/mymoney/storage/mymoneystoragexml.cpp
@@ -841,7 +841,7 @@ void MyMoneyStorageXML::writePricePair(TQDomElement& price, const MyMoneyPriceEn
void MyMoneyStorageXML::writePrice(TQDomElement& price, const MyMoneyPrice& p)
{
- price.setAttribute("date", p.date().toString(Qt::ISODate));
+ price.setAttribute("date", p.date().toString(TQt::ISODate));
price.setAttribute("price", p.rate(TQString()).toString());
price.setAttribute("source", p.source());
}