diff options
Diffstat (limited to 'kmymoney2/mymoney/storage')
-rw-r--r-- | kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp | 2 | ||||
-rw-r--r-- | kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp | 2 | ||||
-rw-r--r-- | kmymoney2/mymoney/storage/mymoneystoragedump.cpp | 26 | ||||
-rw-r--r-- | kmymoney2/mymoney/storage/mymoneystoragesql.cpp | 54 | ||||
-rw-r--r-- | kmymoney2/mymoney/storage/mymoneystoragesql.h | 4 | ||||
-rw-r--r-- | kmymoney2/mymoney/storage/mymoneystoragexml.cpp | 2 |
6 files changed, 45 insertions, 45 deletions
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()); } |