|
|
|
@ -1042,8 +1042,8 @@ MyMoneyGncReader::~MyMoneyGncReader() {}
|
|
|
|
|
#ifndef _GNCFILEANON
|
|
|
|
|
void MyMoneyGncReader::readFile(TQIODevice* pDevice, IMyMoneySerialize* storage) {
|
|
|
|
|
|
|
|
|
|
Q_CHECK_PTR (pDevice);
|
|
|
|
|
Q_CHECK_PTR (storage);
|
|
|
|
|
TQ_CHECK_PTR (pDevice);
|
|
|
|
|
TQ_CHECK_PTR (storage);
|
|
|
|
|
|
|
|
|
|
m_storage = dynamic_cast<IMyMoneyStorage *>(storage);
|
|
|
|
|
qDebug ("Entering gnucash importer");
|
|
|
|
@ -1130,7 +1130,7 @@ void MyMoneyGncReader::setFileHideFactor () {
|
|
|
|
|
|
|
|
|
|
//********************************* convertCommodity *******************************************
|
|
|
|
|
void MyMoneyGncReader::convertCommodity (const GncCommodity *gcm) {
|
|
|
|
|
Q_CHECK_PTR (gcm);
|
|
|
|
|
TQ_CHECK_PTR (gcm);
|
|
|
|
|
MyMoneySecurity equ;
|
|
|
|
|
if (m_commodityCount == 0) signalProgress (0, m_gncCommodityCount, i18n("Loading commodities..."));
|
|
|
|
|
if (!gcm->isCurrency()) { // currencies should not be present here but...
|
|
|
|
@ -1155,7 +1155,7 @@ void MyMoneyGncReader::convertCommodity (const GncCommodity *gcm) {
|
|
|
|
|
|
|
|
|
|
//******************************* convertPrice ************************************************
|
|
|
|
|
void MyMoneyGncReader::convertPrice (const GncPrice *gpr) {
|
|
|
|
|
Q_CHECK_PTR (gpr);
|
|
|
|
|
TQ_CHECK_PTR (gpr);
|
|
|
|
|
// add this to our price history
|
|
|
|
|
if (m_priceCount == 0) signalProgress (0, 1, i18n("Loading prices..."));
|
|
|
|
|
MyMoneyMoney rate = convBadValue (gpr->value());
|
|
|
|
@ -1178,7 +1178,7 @@ void MyMoneyGncReader::convertPrice (const GncPrice *gpr) {
|
|
|
|
|
|
|
|
|
|
//*********************************convertAccount ****************************************
|
|
|
|
|
void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
|
|
|
|
|
Q_CHECK_PTR (gac);
|
|
|
|
|
TQ_CHECK_PTR (gac);
|
|
|
|
|
TRY
|
|
|
|
|
// we don't care about the GNC root account
|
|
|
|
|
if("ROOT" == gac->type()) {
|
|
|
|
@ -1321,7 +1321,7 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
|
|
|
|
|
|
|
|
|
|
//********************************************** convertTransaction *****************************
|
|
|
|
|
void MyMoneyGncReader::convertTransaction (const GncTransaction *gtx) {
|
|
|
|
|
Q_CHECK_PTR (gtx);
|
|
|
|
|
TQ_CHECK_PTR (gtx);
|
|
|
|
|
MyMoneyTransaction tx;
|
|
|
|
|
MyMoneySplit split;
|
|
|
|
|
unsigned int i;
|
|
|
|
@ -1385,7 +1385,7 @@ void MyMoneyGncReader::convertTransaction (const GncTransaction *gtx) {
|
|
|
|
|
}
|
|
|
|
|
//******************************************convertSplit********************************
|
|
|
|
|
void MyMoneyGncReader::convertSplit (const GncSplit *gsp) {
|
|
|
|
|
Q_CHECK_PTR (gsp);
|
|
|
|
|
TQ_CHECK_PTR (gsp);
|
|
|
|
|
MyMoneySplit split;
|
|
|
|
|
MyMoneyAccount splitAccount;
|
|
|
|
|
// find the kmm account id coresponding to the gnc id
|
|
|
|
@ -1512,7 +1512,7 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) {
|
|
|
|
|
//********************************* convertTemplateTransaction **********************************************
|
|
|
|
|
MyMoneyTransaction MyMoneyGncReader::convertTemplateTransaction (const TQString& schedName, const GncTransaction *gtx) {
|
|
|
|
|
|
|
|
|
|
Q_CHECK_PTR (gtx);
|
|
|
|
|
TQ_CHECK_PTR (gtx);
|
|
|
|
|
MyMoneyTransaction tx;
|
|
|
|
|
MyMoneySplit split;
|
|
|
|
|
unsigned int i;
|
|
|
|
@ -1584,7 +1584,7 @@ MyMoneyTransaction MyMoneyGncReader::convertTemplateTransaction (const TQString&
|
|
|
|
|
}
|
|
|
|
|
//********************************* convertTemplateSplit ****************************************************
|
|
|
|
|
void MyMoneyGncReader::convertTemplateSplit (const TQString& schedName, const GncTemplateSplit *gsp) {
|
|
|
|
|
Q_CHECK_PTR (gsp);
|
|
|
|
|
TQ_CHECK_PTR (gsp);
|
|
|
|
|
// convertTemplateSplit
|
|
|
|
|
MyMoneySplit split;
|
|
|
|
|
MyMoneyAccount splitAccount;
|
|
|
|
@ -1712,7 +1712,7 @@ void MyMoneyGncReader::convertTemplateSplit (const TQString& schedName, const Gn
|
|
|
|
|
//********************************* convertSchedule ********************************************************
|
|
|
|
|
void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) {
|
|
|
|
|
TRY
|
|
|
|
|
Q_CHECK_PTR (gsc);
|
|
|
|
|
TQ_CHECK_PTR (gsc);
|
|
|
|
|
MyMoneySchedule sc;
|
|
|
|
|
MyMoneyTransaction tx;
|
|
|
|
|
m_suspectSchedule = false;
|
|
|
|
|