mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Cleanly destroy Application on exit
This commit is contained in:
@@ -154,8 +154,8 @@ void Transaction::save ()
|
||||
status = TXN_SQL_UNKNOWN;
|
||||
}
|
||||
|
||||
Database* db = theApp->getTxnDB ()->getDB ();
|
||||
ScopedLock dbLock (theApp->getTxnDB ()->getDBLock ());
|
||||
Database* db = getApp().getTxnDB ()->getDB ();
|
||||
ScopedLock dbLock (getApp().getTxnDB ()->getDBLock ());
|
||||
db->executeSQL (mTransaction->getSQLInsertReplaceHeader () + mTransaction->getSQL (getLedger (), status) + ";");
|
||||
}
|
||||
|
||||
@@ -231,8 +231,8 @@ Transaction::pointer Transaction::transactionFromSQL (const std::string& sql)
|
||||
rawTxn.resize (txSize);
|
||||
|
||||
{
|
||||
ScopedLock sl (theApp->getTxnDB ()->getDBLock ());
|
||||
Database* db = theApp->getTxnDB ()->getDB ();
|
||||
ScopedLock sl (getApp().getTxnDB ()->getDBLock ());
|
||||
Database* db = getApp().getTxnDB ()->getDB ();
|
||||
|
||||
if (!db->executeSQL (sql, true) || !db->startIterRows ())
|
||||
return Transaction::pointer ();
|
||||
@@ -365,7 +365,7 @@ Json::Value Transaction::getJson (int options, bool binary) const
|
||||
|
||||
if (options == 1)
|
||||
{
|
||||
Ledger::pointer ledger = theApp->getLedgerMaster ().getLedgerBySeq (mInLedger);
|
||||
Ledger::pointer ledger = getApp().getLedgerMaster ().getLedgerBySeq (mInLedger);
|
||||
|
||||
if (ledger)
|
||||
ret["date"] = ledger->getCloseTimeNC ();
|
||||
|
||||
Reference in New Issue
Block a user