diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-05 11:54:03 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-05 22:44:03 +0900 |
commit | 0008104748e6613c41d60b0545c07ed34e16ddec (patch) | |
tree | 12b1131ace7823c35c51d7f03002ed0e9f476dbd /kmymoney2/mymoney/storage/mymoneystoragesql.cpp | |
parent | a84f7caff6a73b3d554279d41b9a00aa15ad1400 (diff) | |
download | kmymoney-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/storage/mymoneystoragesql.cpp')
-rw-r--r-- | kmymoney2/mymoney/storage/mymoneystoragesql.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
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); |