[Kmymoney-devel] MyMoneyFile::price(...) const
Software at quantentunnel.de
Software at quantentunnel.de
Mon Oct 31 18:12:01 UTC 2011
Hi
To provide a first small piece of code (to add currency conversion to kMyMoneyCalculator) I started to look at the relevant source code, downlodade about a week ago.
I do not understand the function below from mymoneyfile.cpp
MyMoneyFile::price(const QString& fromId, const QString& toId, const QDate& date, const bool exactDate) const
{
...
// search 'from-to' rate
MyMoneyPrice rc = d->m_storage->price(fromId, to, date, exactDate);
if (!rc.isValid()) {
// not found, search 'to-fron' rate and use reciprocal value
rc = d->m_storage->price(to, fromId, date, exactDate);
}
return rc;
}
The comment correctly states that the reciprocal value needs to be taken, if to-from instead of from-to is returned. But there is no "1/". What am I missing?
Thanks
Al_
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
More information about the KMyMoney-devel
mailing list